From 06062fe2461121a69c3818965b89260a04a84a3c Mon Sep 17 00:00:00 2001 From: keeran97 <85910337+keeran97@users.noreply.github.com> Date: Fri, 16 Jul 2021 13:57:51 +1200 Subject: [PATCH 01/10] Add parameter sets for mouse and pig bladder --- .../meshtypes/meshtype_3d_bladderurethra1.py | 207 +++++++++++++++--- 1 file changed, 181 insertions(+), 26 deletions(-) diff --git a/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py b/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py index d8d1fcd1..8bbbe7a5 100644 --- a/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py +++ b/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py @@ -46,11 +46,45 @@ class MeshType_3d_bladderurethra1(Scaffold_base): [[0.0, 0.0, 15.0], [0.0, 0.0, 15.0], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], [[0.0, 0.0, 30.0], [0.0, 0.0, 15.0], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], [[0.0, 0.0, 45.0], [0.0, 0.0, 15.0], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.13, 0.1, 60.45], [0.4, 1.1, 13.5], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.42, 1.42, 75.2], [0.3, 1.4, 13.2], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.85, 3.05, 89.94], [-0.2, 1.8, 15.4], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.26, 5.98, 107.94], [-0.6, 4.5, 16.8], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[-0.66, 12.47, 127.07], [0.35, 6.67, 14.8], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]]]), + [[0.0, 0.1, 60.45], [0.4, 1.1, 13.5], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], + [[0.0, 1.42, 75.2], [0.3, 1.4, 13.2], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], + [[0.0, 3.05, 89.94], [-0.2, 1.8, 15.4], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], + [[0.0, 5.98, 107.94], [-0.6, 4.5, 16.8], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], + [[0.0, 12.47, 127.07], [0.35, 6.67, 14.8], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]]]), + 'userAnnotationGroups': [ + { + '_AnnotationGroup': True, + 'dimension': 1, + 'identifierRanges': '1-5', + 'name': get_bladder_term('urinary bladder')[0], + 'ontId': get_bladder_term('urinary bladder')[1] + }, + { + '_AnnotationGroup': True, + 'dimension': 1, + 'identifierRanges': '6-8', + 'name': get_bladder_term('urethra')[0], + 'ontId': get_bladder_term('urethra')[1] + }] + }), + 'Human 1': ScaffoldPackage(MeshType_1d_path1, { + 'scaffoldSettings': { + 'Coordinate dimensions': 3, + 'D2 derivatives': True, + 'Length': 1.0, + 'Number of elements': 8 + }, + 'meshEdits': exnodeStringFromNodeValues( + [Node.VALUE_LABEL_VALUE, Node.VALUE_LABEL_D_DS1, Node.VALUE_LABEL_D_DS2, Node.VALUE_LABEL_D2_DS1DS2], [ + [[0.0, 0.0, 0.0], [0.0, 0.0, 20.0], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], + [[0.0, 0.0, 20.0], [0.0, 0.0, 20.0], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], + [[0.0, 0.0, 40.0], [0.0, 0.0, 20], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], + [[0.0, 0.0, 60.0], [0.0, 0.0, 20], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], + [[0.0, 0.0, 80.0], [-0.4, 0.3, 17.7], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], + [[0.0, -2.1, 100.6], [-1.0, -1.9, 17.2], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], + [[0.0, -3.8, 120.3], [-1.4, -0.6, 18.8], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], + [[0.0, -3.6, 140.5], [-0.1, 2.0, 18.4], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], + [[0.0, 0.0, 160.0], [0.9, 4.0, 15.5], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]]]), 'userAnnotationGroups': [ { '_AnnotationGroup': True, @@ -66,8 +100,8 @@ class MeshType_3d_bladderurethra1(Scaffold_base): 'name': get_bladder_term('urethra')[0], 'ontId': get_bladder_term('urethra')[1] }] - }), - 'Rat 1': ScaffoldPackage(MeshType_1d_path1, { + }), + 'Mouse 1': ScaffoldPackage(MeshType_1d_path1, { 'scaffoldSettings': { 'Coordinate dimensions': 3, 'D2 derivatives': True, @@ -81,10 +115,10 @@ class MeshType_3d_bladderurethra1(Scaffold_base): [[0.0, 0.0, 20.0], [0.0, 0.0, 10], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], [[0.0, 0.0, 30.0], [0.0, 0.0, 10], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], [[0.0, 0.0, 40.0], [-0.4, 0.3, 7.7], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[-0.5, -2.1, 49.6], [-1.0, -1.9, 7.2], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[-0.9, -3.8, 59.3], [-1.4, -0.6, 8.8], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[-1.3, -3.6, 71.5], [-0.1, 2.0, 8.4], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, 0.0, 80.0], [0.9, 4.0, 5.5], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]]]), + [[0.0, -2.1, 45.0], [-1.0, -1.9, 7.2], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], + [[0.0, -3.8, 50.0], [-1.4, -0.6, 8.8], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], + [[0.0, -3.6, 55.0], [-0.1, 2.0, 8.4], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], + [[0.0, 0.0, 60.0], [0.9, 4.0, 5.5], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]]]), 'userAnnotationGroups': [ { '_AnnotationGroup': True, @@ -100,8 +134,8 @@ class MeshType_3d_bladderurethra1(Scaffold_base): 'name': get_bladder_term('urethra')[0], 'ontId': get_bladder_term('urethra')[1] }] - }), - 'Human 1': ScaffoldPackage(MeshType_1d_path1, { + }), + 'Pig 1': ScaffoldPackage(MeshType_1d_path1, { 'scaffoldSettings': { 'Coordinate dimensions': 3, 'D2 derivatives': True, @@ -110,15 +144,49 @@ class MeshType_3d_bladderurethra1(Scaffold_base): }, 'meshEdits': exnodeStringFromNodeValues( [Node.VALUE_LABEL_VALUE, Node.VALUE_LABEL_D_DS1, Node.VALUE_LABEL_D_DS2, Node.VALUE_LABEL_D2_DS1DS2], [ - [[0.0, 0.0, 0.0], [0.0, 0.0, 20.0], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, 0.0, 20.0], [0.0, 0.0, 20.0], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, 0.0, 40.0], [0.0, 0.0, 20], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, 0.0, 60.0], [0.0, 0.0, 20], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, 0.0, 80.0], [-0.4, 0.3, 17.7], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[-0.5, -2.1, 100.6], [-1.0, -1.9, 17.2], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[-0.9, -3.8, 120.3], [-1.4, -0.6, 18.8], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[-1.3, -3.6, 140.5], [-0.1, 2.0, 18.4], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, 0.0, 160.0], [0.9, 4.0, 15.5], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]]]), + [[0.0, 0.0, 0.0], [0.0, 0.0, 23.3], [0.0, 0.5, 0.0], [0.0, 0.0, 0.0]], + [[0.0, 0.0, 25.0], [0.0, 0.0, 21.3], [0.0, 0.5, 0.0], [0.0, 0.0, 0.0]], + [[0.0, 0.0, 40.0], [0.0, 0.0, 20.4], [0.0, 0.5, 0.0], [0.0, 0.0, 0.0]], + [[0.0, 0.0, 65.0], [0.4, 1.0, 24.5], [0.0, 0.5, 0.1], [0.0, -0.0, -0.0]], + [[0.0, 2.4, 90.0], [0.5, 4.2, 23.0], [0.0, 0.5, -0.2], [-0.0, -0.0, -0.1]], + [[0.0, 9.2, 110.0], [0.1, 5.6, 15.4], [-0.0, 0.5, -0.2], [-0.0, 0.0, 0.0]], + [[0.0, 15.3, 125.0], [0.2, 5.3, 12.0], [-0.0, 0.5, -0.2], [0.0, 0.0, -0.1]], + [[0.0, 21.2, 140.0], [0.1, 7.7, 11.9], [0.0, 0.4, -0.3], [0.0, -0.1, -0.1]], + [[0.0, 30.0, 150.0], [2.6, 18.4, 12.5], [-0.0, 0.3, -0.4], [-0.0, -0.2, -0.2]]]), + 'userAnnotationGroups': [ + { + '_AnnotationGroup': True, + 'dimension': 1, + 'identifierRanges': '1-4', + 'name': get_bladder_term('urinary bladder')[0], + 'ontId': get_bladder_term('urinary bladder')[1] + }, + { + '_AnnotationGroup': True, + 'dimension': 1, + 'identifierRanges': '5-8', + 'name': get_bladder_term('urethra')[0], + 'ontId': get_bladder_term('urethra')[1] + }] + }), + 'Rat 1': ScaffoldPackage(MeshType_1d_path1, { + 'scaffoldSettings': { + 'Coordinate dimensions': 3, + 'D2 derivatives': True, + 'Length': 1.0, + 'Number of elements': 8 + }, + 'meshEdits': exnodeStringFromNodeValues( + [Node.VALUE_LABEL_VALUE, Node.VALUE_LABEL_D_DS1, Node.VALUE_LABEL_D_DS2, Node.VALUE_LABEL_D2_DS1DS2], [ + [[0.0, 0.0, 0.0], [0.0, 0.0, 10.0], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], + [[0.0, 0.0, 10.0], [0.0, 0.0, 10.0], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], + [[0.0, 0.0, 20.0], [0.0, 0.0, 10], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], + [[0.0, 0.0, 30.0], [0.0, 0.0, 10], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], + [[0.0, 0.0, 40.0], [-0.4, 0.3, 7.7], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], + [[0.0, -2.1, 49.6], [-1.0, -1.9, 7.2], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], + [[0.0, -3.8, 59.3], [-1.4, -0.6, 8.8], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], + [[0.0, -3.6, 71.5], [-0.1, 2.0, 8.4], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], + [[0.0, 0.0, 80.0], [0.9, 4.0, 5.5], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]]]), 'userAnnotationGroups': [ { '_AnnotationGroup': True, @@ -134,8 +202,8 @@ class MeshType_3d_bladderurethra1(Scaffold_base): 'name': get_bladder_term('urethra')[0], 'ontId': get_bladder_term('urethra')[1] }] - }) - } + }) + } ostiumDefaultScaffoldPackages = { 'Ureter Cat 1': ScaffoldPackage(MeshType_3d_ostium1, { 'scaffoldSettings': { @@ -188,6 +256,58 @@ class MeshType_3d_bladderurethra1(Scaffold_base): 'Refine number of elements through wall': 1 }, }), + 'Ureter Mouse 1': ScaffoldPackage(MeshType_3d_ostium1, { + 'scaffoldSettings': { + 'Number of vessels': 1, + 'Number of elements across common': 2, + 'Number of elements around ostium': 8, # implemented for 8 + 'Number of elements along': 1, + 'Unit scale': 1.0, + 'Outlet': False, + 'Ostium diameter': 1.0, + 'Ostium length': 0.25, + 'Ostium wall thickness': 0.02, + 'Use linear through ostium wall': True, + 'Vessel end length factor': 2.0, + 'Vessel inner diameter': 0.3, + 'Vessel wall thickness': 0.1, + 'Vessel angle 1 degrees': 0.0, + 'Vessel angle 1 spread degrees': 0.0, + 'Vessel angle 2 degrees': 0.0, + 'Use linear through vessel wall': True, + 'Use cross derivatives': False, + 'Refine': False, + 'Refine number of elements around': 4, + 'Refine number of elements along': 4, + 'Refine number of elements through wall': 1 + }, + }), + 'Ureter Pig 1': ScaffoldPackage(MeshType_3d_ostium1, { + 'scaffoldSettings': { + 'Number of vessels': 1, + 'Number of elements across common': 2, + 'Number of elements around ostium': 8, # implemented for 8 + 'Number of elements along': 1, + 'Unit scale': 1.0, + 'Outlet': False, + 'Ostium diameter': 2.3, + 'Ostium length': 0.35, + 'Ostium wall thickness': 0.3, + 'Use linear through ostium wall': True, + 'Vessel end length factor': 2.0, + 'Vessel inner diameter': 1.3, + 'Vessel wall thickness': 0.2, + 'Vessel angle 1 degrees': 0.0, + 'Vessel angle 1 spread degrees': 0.0, + 'Vessel angle 2 degrees': 0.0, + 'Use linear through vessel wall': True, + 'Use cross derivatives': False, + 'Refine': False, + 'Refine number of elements around': 4, + 'Refine number of elements along': 4, + 'Refine number of elements through wall': 1 + }, + }), 'Ureter Human 1': ScaffoldPackage(MeshType_3d_ostium1, { 'scaffoldSettings': { 'Number of vessels': 1, @@ -225,19 +345,30 @@ def getParameterSetNames(): return [ 'Default', 'Cat 1', - 'Rat 1', - 'Human 1'] + 'Human 1', + 'Mouse 1', + 'Pig 1', + 'Rat 1' + ] @classmethod def getDefaultOptions(cls, parameterSetName='Default'): if 'Rat 1' in parameterSetName: centralPathOption_LUT = cls.centralPathDefaultScaffoldPackages_LUT['Rat 1'] + if 'Mouse 1' in parameterSetName: + centralPathOption_LUT = cls.centralPathDefaultScaffoldPackages_LUT['Mouse 1'] + if 'Pig 1' in parameterSetName: + centralPathOption_LUT = cls.centralPathDefaultScaffoldPackages_LUT['Pig 1'] elif 'Human 1' in parameterSetName: centralPathOption_LUT = cls.centralPathDefaultScaffoldPackages_LUT['Human 1'] else: centralPathOption_LUT = cls.centralPathDefaultScaffoldPackages_LUT['Cat 1'] if 'Rat 1' in parameterSetName: ureterOption = cls.ostiumDefaultScaffoldPackages['Ureter Rat 1'] + if 'Mouse 1' in parameterSetName: + ureterOption = cls.ostiumDefaultScaffoldPackages['Ureter Mouse 1'] + if 'Pig 1' in parameterSetName: + ureterOption = cls.ostiumDefaultScaffoldPackages['Ureter Pig 1'] elif 'Human 1' in parameterSetName: ureterOption = cls.ostiumDefaultScaffoldPackages['Ureter Human 1'] else: @@ -281,6 +412,30 @@ def getDefaultOptions(cls, parameterSetName='Default'): options['Urethra diameter 1'] = 0.75 options['Urethra diameter 2'] = 0.65 options['Urethra wall thickness'] = 0.25 + if 'Mouse' in parameterSetName: + options['Major diameter'] = 30.0 + options['Minor diameter'] = 30.0 + options['Wall thickness'] = 0.2 + options['Neck diameter 1'] = 5.0 + options['Neck diameter 2'] = 7.0 + options['Neck angle degrees'] = 25 + options['Ureter position around'] = 0.67 # should be on the dorsal part (> 0.5) + options['Ureter position down'] = 0.83 + options['Urethra diameter 1'] = 2.0 + options['Urethra diameter 2'] = 2.0 + options['Urethra wall thickness'] = 0.25 + if 'Pig' in parameterSetName: + options['Major diameter'] = 30.0 + options['Minor diameter'] = 30.0 + options['Wall thickness'] = 0.3 + options['Neck diameter 1'] = 8.0 + options['Neck diameter 2'] = 7.5 + options['Neck angle degrees'] = 25 + options['Ureter position around'] = 0.67 # should be on the dorsal part (> 0.5) + options['Ureter position down'] = 0.83 + options['Urethra diameter 1'] = 2.0 + options['Urethra diameter 2'] = 2.0 + options['Urethra wall thickness'] = 0.25 if 'Human' in parameterSetName: options['Number of elements along bladder'] = 8 options['Number of elements around'] = 12 From 7ffcc219e81c56c8ba96c4d3c105c38d65c26101 Mon Sep 17 00:00:00 2001 From: keeran97 <85910337+keeran97@users.noreply.github.com> Date: Wed, 4 Aug 2021 15:56:55 +1200 Subject: [PATCH 02/10] changed line 159 to >1e-12 to account for cases that have values very close to zero (as per Mabelle) --- src/scaffoldmaker/utils/tubemesh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scaffoldmaker/utils/tubemesh.py b/src/scaffoldmaker/utils/tubemesh.py index 9b1f6259..b1c53864 100644 --- a/src/scaffoldmaker/utils/tubemesh.py +++ b/src/scaffoldmaker/utils/tubemesh.py @@ -156,7 +156,7 @@ def warpSegmentPoints(xList, d1List, d2List, segmentAxis, vectorToFirstNode = [xRot1[c] - centroidRot[c] for c in range(3)] if vector.magnitude(vectorToFirstNode) > 0.0: cp = vector.crossproduct3(vector.normalise(vectorToFirstNode), sd2[nAlongSegment]) - if vector.magnitude(cp) > 0: + if vector.magnitude(cp) > 1e-12: cp = vector.normalise(cp) signThetaRot2 = vector.dotproduct(unitTangent, cp) thetaRot2 = math.acos( From 784a92a1b39f8c26dd813cc47877faeee0ae7227 Mon Sep 17 00:00:00 2001 From: keeran97 <85910337+keeran97@users.noreply.github.com> Date: Thu, 5 Aug 2021 10:17:54 +1200 Subject: [PATCH 03/10] made all x-values in central path 0 for all bladders; decreased number of elements in central path for all bladders; resized mouse and rat bladder to be smaller; --- .../meshtypes/meshtype_3d_bladderurethra1.py | 236 ++++++++---------- 1 file changed, 111 insertions(+), 125 deletions(-) diff --git a/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py b/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py index 8bbbe7a5..44b7277c 100644 --- a/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py +++ b/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py @@ -38,31 +38,29 @@ class MeshType_3d_bladderurethra1(Scaffold_base): 'Coordinate dimensions': 3, 'D2 derivatives': True, 'Length': 1.0, - 'Number of elements': 8 + 'Number of elements': 5 }, 'meshEdits': exnodeStringFromNodeValues( [Node.VALUE_LABEL_VALUE, Node.VALUE_LABEL_D_DS1, Node.VALUE_LABEL_D_DS2, Node.VALUE_LABEL_D2_DS1DS2], [ - [[0.0, 0.0, 0.0], [0.0, 0.0, 15.0], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, 0.0, 15.0], [0.0, 0.0, 15.0], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, 0.0, 30.0], [0.0, 0.0, 15.0], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, 0.0, 45.0], [0.0, 0.0, 15.0], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, 0.1, 60.45], [0.4, 1.1, 13.5], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, 1.42, 75.2], [0.3, 1.4, 13.2], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, 3.05, 89.94], [-0.2, 1.8, 15.4], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, 5.98, 107.94], [-0.6, 4.5, 16.8], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, 12.47, 127.07], [0.35, 6.67, 14.8], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]]]), + [[0.0000, 0.0000, 0.0000], [0.0000, 0.0000, 15.000], [0.0000, 0.5000, 0.0000], [0.0000, 0.0000, 0.0000]], + [[0.0000, 0.0000, 15.000], [0.0000, 0.0000, 15.000], [0.0000, 0.5000, 0.0000], [0.0000, 0.0000, 0.0000]], + [[0.0000, 0.0000, 30.000], [0.0000, 0.0959, 22.926], [0.0000, 0.5000, 0.0021], [0.0000, 0.0002, 0.0080]], + [[0.0000, 0.2582, 60.850], [0.0000, 1.1010, 30.038], [0.0000, 0.4999, 0.0107], [0.0000, 0.0032, 0.0398]], + [[0.0000, 2.1551, 90.021], [0.0000, 5.6726, 33.424], [0.0000, 0.4911, 0.0937], [0.0000, 0.0177, 0.0814]], + [[0.0000, 12.470, 127.10], [0.0000, 14.883, 40.532], [0.0000, 0.4758, 0.1537], [0.0000, 0.0493, 0.1522]], + ]), 'userAnnotationGroups': [ { '_AnnotationGroup': True, 'dimension': 1, - 'identifierRanges': '1-5', + 'identifierRanges': '1-3', 'name': get_bladder_term('urinary bladder')[0], 'ontId': get_bladder_term('urinary bladder')[1] }, { '_AnnotationGroup': True, 'dimension': 1, - 'identifierRanges': '6-8', + 'identifierRanges': '4-5', 'name': get_bladder_term('urethra')[0], 'ontId': get_bladder_term('urethra')[1] }] @@ -72,31 +70,29 @@ class MeshType_3d_bladderurethra1(Scaffold_base): 'Coordinate dimensions': 3, 'D2 derivatives': True, 'Length': 1.0, - 'Number of elements': 8 + 'Number of elements': 5 }, 'meshEdits': exnodeStringFromNodeValues( [Node.VALUE_LABEL_VALUE, Node.VALUE_LABEL_D_DS1, Node.VALUE_LABEL_D_DS2, Node.VALUE_LABEL_D2_DS1DS2], [ - [[0.0, 0.0, 0.0], [0.0, 0.0, 20.0], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, 0.0, 20.0], [0.0, 0.0, 20.0], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, 0.0, 40.0], [0.0, 0.0, 20], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, 0.0, 60.0], [0.0, 0.0, 20], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, 0.0, 80.0], [-0.4, 0.3, 17.7], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, -2.1, 100.6], [-1.0, -1.9, 17.2], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, -3.8, 120.3], [-1.4, -0.6, 18.8], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, -3.6, 140.5], [-0.1, 2.0, 18.4], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, 0.0, 160.0], [0.9, 4.0, 15.5], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]]]), + [[0.0000, 0.0000, 0.0000], [0.0000, 0.0000, 20.000], [0.0000, 0.5000, 0.0000], [0.0000, 0.0000, 0.0000]], + [[0.0000, 0.0000, 20.000], [0.0000, 0.0000, 20.000], [0.0000, 0.5000, 0.0000], [0.0000, 0.0000, 0.0000]], + [[0.0000, 0.0000, 40.000], [0.0000, 0.0000, 30.003], [0.0000, 0.5000, 0.0000], [0.0000, -0.0000, 0.0028]], + [[0.0000, 0.0000, 80.000], [0.0000, 1.8911, 40.202], [0.0000, 0.4993, -0.0254], [0.0000, -0.0002, 0.0080]], + [[0.0000, 3.8000, 120.30], [0.0000, 1.2771, 30.329], [0.0000, 0.4996, -0.0190], [0.0000, -0.0018, 0.0279]], + [[0.0000, 3.6000, 140.50], [0.0000, -1.6581, 9.9571], [0.0000, 0.4977, -0.0480], [0.0000, -0.0034, 0.0483]], + ]), 'userAnnotationGroups': [ { '_AnnotationGroup': True, 'dimension': 1, - 'identifierRanges': '1-4', + 'identifierRanges': '1-3', 'name': get_bladder_term('urinary bladder')[0], 'ontId': get_bladder_term('urinary bladder')[1] }, { '_AnnotationGroup': True, 'dimension': 1, - 'identifierRanges': '5-8', + 'identifierRanges': '4-5', 'name': get_bladder_term('urethra')[0], 'ontId': get_bladder_term('urethra')[1] }] @@ -106,31 +102,29 @@ class MeshType_3d_bladderurethra1(Scaffold_base): 'Coordinate dimensions': 3, 'D2 derivatives': True, 'Length': 1.0, - 'Number of elements': 8 + 'Number of elements': 5 }, 'meshEdits': exnodeStringFromNodeValues( [Node.VALUE_LABEL_VALUE, Node.VALUE_LABEL_D_DS1, Node.VALUE_LABEL_D_DS2, Node.VALUE_LABEL_D2_DS1DS2], [ - [[0.0, 0.0, 0.0], [0.0, 0.0, 10.0], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, 0.0, 10.0], [0.0, 0.0, 10.0], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, 0.0, 20.0], [0.0, 0.0, 10], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, 0.0, 30.0], [0.0, 0.0, 10], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, 0.0, 40.0], [-0.4, 0.3, 7.7], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, -2.1, 45.0], [-1.0, -1.9, 7.2], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, -3.8, 50.0], [-1.4, -0.6, 8.8], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, -3.6, 55.0], [-0.1, 2.0, 8.4], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, 0.0, 60.0], [0.9, 4.0, 5.5], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]]]), + [[0.0000, 0.0000, 0.0000], [0.0000, 0.0301, 0.8134], [0.0000, 0.5000, 0.0000], [0.0000, 0.0000, -0.0204]], + [[0.0000, 0.0000, 1.2321], [0.0000, -0.0120, 1.6504], [0.0000, 0.5000, 0.0000], [0.0000, 0.0001, -0.0093]], + [[0.0000, 0.0000, 3.3002], [0.0000, -0.0024, 1.9672], [0.0000, 0.5000, 0.0000], [0.0000, -0.0001, 0.0105]], + [[0.0000, 0.0000, 5.1649], [0.0000, -0.1043, 2.3452], [0.0000, 0.4997, 0.0163], [0.0000, -0.0004, -0.0039]], + [[0.0000, -0.3056, 7.9736], [0.0000, 0.1381, 2.5534], [0.0000, 0.4987, -0.0319], [0.0000, -0.0157, -0.0861]], + [[0.0000, 0.1840, 10.193], [0.0000, 0.8202, 1.8381], [0.0000, 0.4573, -0.1876], [0.0000, -0.0400, -0.1607]], + ]), 'userAnnotationGroups': [ { '_AnnotationGroup': True, 'dimension': 1, - 'identifierRanges': '1-4', + 'identifierRanges': '1-3', 'name': get_bladder_term('urinary bladder')[0], 'ontId': get_bladder_term('urinary bladder')[1] }, { '_AnnotationGroup': True, 'dimension': 1, - 'identifierRanges': '5-8', + 'identifierRanges': '4-5', 'name': get_bladder_term('urethra')[0], 'ontId': get_bladder_term('urethra')[1] }] @@ -140,31 +134,29 @@ class MeshType_3d_bladderurethra1(Scaffold_base): 'Coordinate dimensions': 3, 'D2 derivatives': True, 'Length': 1.0, - 'Number of elements': 8 + 'Number of elements': 5 }, 'meshEdits': exnodeStringFromNodeValues( [Node.VALUE_LABEL_VALUE, Node.VALUE_LABEL_D_DS1, Node.VALUE_LABEL_D_DS2, Node.VALUE_LABEL_D2_DS1DS2], [ - [[0.0, 0.0, 0.0], [0.0, 0.0, 23.3], [0.0, 0.5, 0.0], [0.0, 0.0, 0.0]], - [[0.0, 0.0, 25.0], [0.0, 0.0, 21.3], [0.0, 0.5, 0.0], [0.0, 0.0, 0.0]], - [[0.0, 0.0, 40.0], [0.0, 0.0, 20.4], [0.0, 0.5, 0.0], [0.0, 0.0, 0.0]], - [[0.0, 0.0, 65.0], [0.4, 1.0, 24.5], [0.0, 0.5, 0.1], [0.0, -0.0, -0.0]], - [[0.0, 2.4, 90.0], [0.5, 4.2, 23.0], [0.0, 0.5, -0.2], [-0.0, -0.0, -0.1]], - [[0.0, 9.2, 110.0], [0.1, 5.6, 15.4], [-0.0, 0.5, -0.2], [-0.0, 0.0, 0.0]], - [[0.0, 15.3, 125.0], [0.2, 5.3, 12.0], [-0.0, 0.5, -0.2], [0.0, 0.0, -0.1]], - [[0.0, 21.2, 140.0], [0.1, 7.7, 11.9], [0.0, 0.4, -0.3], [0.0, -0.1, -0.1]], - [[0.0, 30.0, 150.0], [2.6, 18.4, 12.5], [-0.0, 0.3, -0.4], [-0.0, -0.2, -0.2]]]), + [[0.0000, 0.0000, 0.0000], [0.0000, 0.0154, 30.752], [0.0000, 0.5000, 0.0003], [0.0000, 0.0179, 0.0102]], + [[0.0000, 0.1469, 32.068], [0.0000, 0.2784, 33.382], [0.0000, 0.5000, 0.0042], [0.0000, 0.0179, 0.0181]], + [[0.0000, 0.5666, 66.756], [0.0000, 2.1900, 31.319], [0.0000, 0.5372, 0.0376], [0.0001, 0.0113, 0.0541]], + [[0.0000, 4.1370, 94.593], [0.0000, 6.1473, 29.506], [0.0000, 0.5272, 0.1098], [0.0000, 0.0382, 0.0822]], + [[0.0000, 13.121, 125.46], [0.0000, 11.416, 27.599], [0.0000, 0.4620, 0.1911], [0.0017, 0.0742, 0.1095]], + [[0.0000, 26.328, 149.56], [0.0000, 14.845, 20.395], [0.0000, 0.4043, 0.2942], [0.0044, 0.0800, 0.1341]], + ]), 'userAnnotationGroups': [ { '_AnnotationGroup': True, 'dimension': 1, - 'identifierRanges': '1-4', + 'identifierRanges': '1-3', 'name': get_bladder_term('urinary bladder')[0], 'ontId': get_bladder_term('urinary bladder')[1] }, { '_AnnotationGroup': True, 'dimension': 1, - 'identifierRanges': '5-8', + 'identifierRanges': '4-6', 'name': get_bladder_term('urethra')[0], 'ontId': get_bladder_term('urethra')[1] }] @@ -174,31 +166,29 @@ class MeshType_3d_bladderurethra1(Scaffold_base): 'Coordinate dimensions': 3, 'D2 derivatives': True, 'Length': 1.0, - 'Number of elements': 8 + 'Number of elements': 5 }, 'meshEdits': exnodeStringFromNodeValues( [Node.VALUE_LABEL_VALUE, Node.VALUE_LABEL_D_DS1, Node.VALUE_LABEL_D_DS2, Node.VALUE_LABEL_D2_DS1DS2], [ - [[0.0, 0.0, 0.0], [0.0, 0.0, 10.0], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, 0.0, 10.0], [0.0, 0.0, 10.0], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, 0.0, 20.0], [0.0, 0.0, 10], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, 0.0, 30.0], [0.0, 0.0, 10], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, 0.0, 40.0], [-0.4, 0.3, 7.7], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, -2.1, 49.6], [-1.0, -1.9, 7.2], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, -3.8, 59.3], [-1.4, -0.6, 8.8], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, -3.6, 71.5], [-0.1, 2.0, 8.4], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]], - [[0.0, 0.0, 80.0], [0.9, 4.0, 5.5], [0.0, 0.5, 0.0], [0.0, 0.0, -0.5]]]), + [[0.0000, 0.0000, 0.000000], [0.0000, 0.0000, 0.8141], [0.0000, 0.5000, -0.0185], [0.0000, 0.0000, 0.0000]], + [[0.0000, 0.0000, 1.232100], [0.0000, 0.0000, 1.6501], [0.0000, 0.5000, 0.0036], [0.0000, 0.0000, 0.0000]], + [[0.0000, 0.0000, 3.300200], [0.0000, 0.0000, 1.9664], [0.0000, 0.5000, 0.0006], [0.0000, -0.0002, 0.0086]], + [[0.0000, 0.0000, 5.164900], [0.0000, -0.0334, 2.3482], [0.0000, 0.4995, 0.0222], [0.0000, -0.0006, -0.0093]], + [[0.0000, -0.0806, 7.995376], [0.0000, 0.0855, 2.7595], [0.0000, 0.4990, -0.0270], [0.0000, -0.0217, -0.1032]], + [[0.0000, 0.1622, 10.672070], [0.0000, 0.3991, 2.5873], [0.0000, 0.4514, -0.2014], [0.0000, -0.0611, -0.2082]], + ]), 'userAnnotationGroups': [ { '_AnnotationGroup': True, 'dimension': 1, - 'identifierRanges': '1-4', + 'identifierRanges': '1-3', 'name': get_bladder_term('urinary bladder')[0], 'ontId': get_bladder_term('urinary bladder')[1] }, { '_AnnotationGroup': True, 'dimension': 1, - 'identifierRanges': '5-8', + 'identifierRanges': '4-5', 'name': get_bladder_term('urethra')[0], 'ontId': get_bladder_term('urethra')[1] }] @@ -230,7 +220,7 @@ class MeshType_3d_bladderurethra1(Scaffold_base): 'Refine number of elements through wall': 1 }, }), - 'Ureter Rat 1': ScaffoldPackage(MeshType_3d_ostium1, { + 'Ureter Human 1': ScaffoldPackage(MeshType_3d_ostium1, { 'scaffoldSettings': { 'Number of vessels': 1, 'Number of elements across common': 2, @@ -238,12 +228,12 @@ class MeshType_3d_bladderurethra1(Scaffold_base): 'Number of elements along': 1, 'Unit scale': 1.0, 'Outlet': False, - 'Ostium diameter': 1.0, - 'Ostium length': 0.25, - 'Ostium wall thickness': 0.02, + 'Ostium diameter': 3.0, + 'Ostium length': 0.5, + 'Ostium wall thickness': 0.5, 'Use linear through ostium wall': True, 'Vessel end length factor': 2.0, - 'Vessel inner diameter': 0.3, + 'Vessel inner diameter': 1.0, 'Vessel wall thickness': 0.1, 'Vessel angle 1 degrees': 0.0, 'Vessel angle 1 spread degrees': 0.0, @@ -264,13 +254,13 @@ class MeshType_3d_bladderurethra1(Scaffold_base): 'Number of elements along': 1, 'Unit scale': 1.0, 'Outlet': False, - 'Ostium diameter': 1.0, - 'Ostium length': 0.25, + 'Ostium diameter': 0.5, + 'Ostium length': 0.05, 'Ostium wall thickness': 0.02, 'Use linear through ostium wall': True, 'Vessel end length factor': 2.0, - 'Vessel inner diameter': 0.3, - 'Vessel wall thickness': 0.1, + 'Vessel inner diameter': 0.1, + 'Vessel wall thickness': 0.05, 'Vessel angle 1 degrees': 0.0, 'Vessel angle 1 spread degrees': 0.0, 'Vessel angle 2 degrees': 0.0, @@ -308,7 +298,7 @@ class MeshType_3d_bladderurethra1(Scaffold_base): 'Refine number of elements through wall': 1 }, }), - 'Ureter Human 1': ScaffoldPackage(MeshType_3d_ostium1, { + 'Ureter Rat 1': ScaffoldPackage(MeshType_3d_ostium1, { 'scaffoldSettings': { 'Number of vessels': 1, 'Number of elements across common': 2, @@ -316,13 +306,13 @@ class MeshType_3d_bladderurethra1(Scaffold_base): 'Number of elements along': 1, 'Unit scale': 1.0, 'Outlet': False, - 'Ostium diameter': 3.0, - 'Ostium length': 0.5, - 'Ostium wall thickness': 0.5, + 'Ostium diameter': 0.5, + 'Ostium length': 0.05, + 'Ostium wall thickness': 0.02, 'Use linear through ostium wall': True, 'Vessel end length factor': 2.0, - 'Vessel inner diameter': 1.0, - 'Vessel wall thickness': 0.1, + 'Vessel inner diameter': 0.1, + 'Vessel wall thickness': 0.05, 'Vessel angle 1 degrees': 0.0, 'Vessel angle 1 spread degrees': 0.0, 'Vessel angle 2 degrees': 0.0, @@ -353,25 +343,20 @@ def getParameterSetNames(): @classmethod def getDefaultOptions(cls, parameterSetName='Default'): - if 'Rat 1' in parameterSetName: - centralPathOption_LUT = cls.centralPathDefaultScaffoldPackages_LUT['Rat 1'] - if 'Mouse 1' in parameterSetName: - centralPathOption_LUT = cls.centralPathDefaultScaffoldPackages_LUT['Mouse 1'] - if 'Pig 1' in parameterSetName: - centralPathOption_LUT = cls.centralPathDefaultScaffoldPackages_LUT['Pig 1'] - elif 'Human 1' in parameterSetName: + if 'Human 1' in parameterSetName: centralPathOption_LUT = cls.centralPathDefaultScaffoldPackages_LUT['Human 1'] - else: - centralPathOption_LUT = cls.centralPathDefaultScaffoldPackages_LUT['Cat 1'] - if 'Rat 1' in parameterSetName: - ureterOption = cls.ostiumDefaultScaffoldPackages['Ureter Rat 1'] - if 'Mouse 1' in parameterSetName: + ureterOption = cls.ostiumDefaultScaffoldPackages['Ureter Human 1'] + elif 'Mouse 1' in parameterSetName: + centralPathOption_LUT = cls.centralPathDefaultScaffoldPackages_LUT['Mouse 1'] ureterOption = cls.ostiumDefaultScaffoldPackages['Ureter Mouse 1'] - if 'Pig 1' in parameterSetName: + elif 'Pig 1' in parameterSetName: + centralPathOption_LUT = cls.centralPathDefaultScaffoldPackages_LUT['Pig 1'] ureterOption = cls.ostiumDefaultScaffoldPackages['Ureter Pig 1'] - elif 'Human 1' in parameterSetName: - ureterOption = cls.ostiumDefaultScaffoldPackages['Ureter Human 1'] + elif 'Rat 1' in parameterSetName: + centralPathOption_LUT = cls.centralPathDefaultScaffoldPackages_LUT['Rat 1'] + ureterOption = cls.ostiumDefaultScaffoldPackages['Ureter Rat 1'] else: + centralPathOption_LUT = cls.centralPathDefaultScaffoldPackages_LUT['Cat 1'] ureterOption = cls.ostiumDefaultScaffoldPackages['Ureter Cat 1'] options = { 'Central path LUT': copy.deepcopy(centralPathOption_LUT), @@ -401,41 +386,6 @@ def getDefaultOptions(cls, parameterSetName='Default'): 'Refine number of elements along': 4, 'Refine number of elements through wall': 1 } - if 'Rat' in parameterSetName: - options['Major diameter'] = 20.0 - options['Minor diameter'] = 10.0 - options['Wall thickness'] = 0.2 - options['Neck diameter 1'] = 3.5 - options['Neck diameter 2'] = 2.0 - options['Ureter position around'] = 0.67 # should be on the dorsal part (> 0.5) - options['Ureter position down'] = 0.83 - options['Urethra diameter 1'] = 0.75 - options['Urethra diameter 2'] = 0.65 - options['Urethra wall thickness'] = 0.25 - if 'Mouse' in parameterSetName: - options['Major diameter'] = 30.0 - options['Minor diameter'] = 30.0 - options['Wall thickness'] = 0.2 - options['Neck diameter 1'] = 5.0 - options['Neck diameter 2'] = 7.0 - options['Neck angle degrees'] = 25 - options['Ureter position around'] = 0.67 # should be on the dorsal part (> 0.5) - options['Ureter position down'] = 0.83 - options['Urethra diameter 1'] = 2.0 - options['Urethra diameter 2'] = 2.0 - options['Urethra wall thickness'] = 0.25 - if 'Pig' in parameterSetName: - options['Major diameter'] = 30.0 - options['Minor diameter'] = 30.0 - options['Wall thickness'] = 0.3 - options['Neck diameter 1'] = 8.0 - options['Neck diameter 2'] = 7.5 - options['Neck angle degrees'] = 25 - options['Ureter position around'] = 0.67 # should be on the dorsal part (> 0.5) - options['Ureter position down'] = 0.83 - options['Urethra diameter 1'] = 2.0 - options['Urethra diameter 2'] = 2.0 - options['Urethra wall thickness'] = 0.25 if 'Human' in parameterSetName: options['Number of elements along bladder'] = 8 options['Number of elements around'] = 12 @@ -451,6 +401,42 @@ def getDefaultOptions(cls, parameterSetName='Default'): options['Urethra diameter 1'] = 1.5 options['Urethra diameter 2'] = 1.0 options['Urethra wall thickness'] = 0.5 + if 'Mouse' in parameterSetName: + options['Major diameter'] = 3.0 + options['Minor diameter'] = 2.5 + options['Wall thickness'] = 0.1 + options['Neck diameter 1'] = 0.5 + options['Neck diameter 2'] = 0.5 + options['Neck angle degrees'] = 25 + options['Ureter position around'] = 0.67 # should be on the dorsal part (> 0.5) + options['Ureter position down'] = 0.83 + options['Urethra diameter 1'] = 0.1 + options['Urethra diameter 2'] = 0.1 + options['Urethra wall thickness'] = 0.05 + if 'Pig' in parameterSetName: + options['Major diameter'] = 30.0 + options['Minor diameter'] = 30.0 + options['Wall thickness'] = 0.3 + options['Neck diameter 1'] = 8.0 + options['Neck diameter 2'] = 7.5 + options['Neck angle degrees'] = 25 + options['Ureter position around'] = 0.67 # should be on the dorsal part (> 0.5) + options['Ureter position down'] = 0.83 + options['Urethra diameter 1'] = 1.0 + options['Urethra diameter 2'] = 1.0 + options['Urethra wall thickness'] = 0.25 + if 'Rat' in parameterSetName: + options['Major diameter'] = 3.5 + options['Minor diameter'] = 2.5 + options['Wall thickness'] = 0.1 + options['Neck diameter 1'] = 0.5 + options['Neck diameter 2'] = 0.5 + options['Neck angle degrees'] = 25 + options['Ureter position around'] = 0.67 # should be on the dorsal part (> 0.5) + options['Ureter position down'] = 0.83 + options['Urethra diameter 1'] = 0.1 + options['Urethra diameter 2'] = 0.1 + options['Urethra wall thickness'] = 0.05 return options @staticmethod From 13b9b7ad1a17b1332991f38087c0e3db4c62c80b Mon Sep 17 00:00:00 2001 From: keeran97 <85910337+keeran97@users.noreply.github.com> Date: Thu, 5 Aug 2021 11:10:46 +1200 Subject: [PATCH 04/10] resized the cat bladder appropriately; alphabetised the species throughout the code --- .../meshtypes/meshtype_3d_bladderurethra1.py | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py b/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py index 44b7277c..f289b1c2 100644 --- a/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py +++ b/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py @@ -42,12 +42,12 @@ class MeshType_3d_bladderurethra1(Scaffold_base): }, 'meshEdits': exnodeStringFromNodeValues( [Node.VALUE_LABEL_VALUE, Node.VALUE_LABEL_D_DS1, Node.VALUE_LABEL_D_DS2, Node.VALUE_LABEL_D2_DS1DS2], [ - [[0.0000, 0.0000, 0.0000], [0.0000, 0.0000, 15.000], [0.0000, 0.5000, 0.0000], [0.0000, 0.0000, 0.0000]], - [[0.0000, 0.0000, 15.000], [0.0000, 0.0000, 15.000], [0.0000, 0.5000, 0.0000], [0.0000, 0.0000, 0.0000]], - [[0.0000, 0.0000, 30.000], [0.0000, 0.0959, 22.926], [0.0000, 0.5000, 0.0021], [0.0000, 0.0002, 0.0080]], - [[0.0000, 0.2582, 60.850], [0.0000, 1.1010, 30.038], [0.0000, 0.4999, 0.0107], [0.0000, 0.0032, 0.0398]], - [[0.0000, 2.1551, 90.021], [0.0000, 5.6726, 33.424], [0.0000, 0.4911, 0.0937], [0.0000, 0.0177, 0.0814]], - [[0.0000, 12.470, 127.10], [0.0000, 14.883, 40.532], [0.0000, 0.4758, 0.1537], [0.0000, 0.0493, 0.1522]], + [[0.0000, 0.0000, 0.0000], [0.0000, 0.0000, 4.4964], [0.0000, 0.5000, -0.0000], [0.0000, -0.0000, 0.0008]], + [[0.0000, 0.0000, 6.0276], [0.0000, 0.0000, 7.5587], [0.0000, 0.5000, -0.0000], [0.0000, 0.0000, -0.0008]], + [[0.0000, 0.0000, 15.118], [0.0000, -0.0294, 14.699], [0.0000, 0.5000, -0.0016], [0.0000, -0.0001, -0.0065]], + [[0.0000, -0.0813, 35.426], [0.0000, 0.1628, 21.513], [0.0000, 0.4998, -0.0145], [0.0000, -0.0034, -0.0394]], + [[0.0000, 0.3532, 58.111], [0.0000, 3.4665, 21.596], [0.0000, 0.4913, -0.0925], [0.0000, -0.0155, -0.0775]], + [[0.0000, 6.5346, 78.130], [0.0000, 8.7668, 18.175], [0.0000, 0.4421, -0.2337], [0.0000, -0.0316, -0.0999]], ]), 'userAnnotationGroups': [ { @@ -156,7 +156,7 @@ class MeshType_3d_bladderurethra1(Scaffold_base): { '_AnnotationGroup': True, 'dimension': 1, - 'identifierRanges': '4-6', + 'identifierRanges': '4-5', 'name': get_bladder_term('urethra')[0], 'ontId': get_bladder_term('urethra')[1] }] @@ -202,13 +202,13 @@ class MeshType_3d_bladderurethra1(Scaffold_base): 'Number of elements along': 1, 'Unit scale': 1.0, 'Outlet': False, - 'Ostium diameter': 2.2, - 'Ostium length': 0.5, - 'Ostium wall thickness': 0.5, + 'Ostium diameter': 2.0, + 'Ostium length': 0.3, + 'Ostium wall thickness': 0.4, 'Use linear through ostium wall': True, 'Vessel end length factor': 2.0, - 'Vessel inner diameter': 0.8, - 'Vessel wall thickness': 0.25, + 'Vessel inner diameter': 0.7, + 'Vessel wall thickness': 0.2, 'Vessel angle 1 degrees': 0.0, 'Vessel angle 1 spread degrees': 0.0, 'Vessel angle 2 degrees': 0.0, @@ -363,17 +363,17 @@ def getDefaultOptions(cls, parameterSetName='Default'): 'Number of elements along bladder': 12, 'Number of elements around': 12, 'Number of elements through wall': 1, - 'Major diameter': 30.0, - 'Minor diameter': 25.0, - 'Neck diameter 1': 5.0, - 'Neck diameter 2': 4.0, - 'Wall thickness': 0.5, + 'Major diameter': 20.0, + 'Minor diameter': 15.0, + 'Neck diameter 1': 4.0, + 'Neck diameter 2': 3.0, + 'Wall thickness': 0.4, 'Neck angle degrees': 45, 'Include urethra': True, 'Number of elements along urethra': 8, - 'Urethra diameter 1': 1.5, - 'Urethra diameter 2': 1.0, - 'Urethra wall thickness': 0.5, + 'Urethra diameter 1': 1.0, + 'Urethra diameter 2': 0.7, + 'Urethra wall thickness': 0.4, 'Include ureter': False, 'Ureter': copy.deepcopy(ureterOption), 'Ureter position around': 0.67, # should be on the dorsal part (> 0.5) From 3fda92ab1393419322395d38918edc3b1f0713d4 Mon Sep 17 00:00:00 2001 From: keeran97 <85910337+keeran97@users.noreply.github.com> Date: Thu, 5 Aug 2021 12:01:08 +1200 Subject: [PATCH 05/10] resized pig bladder --- .../meshtypes/meshtype_3d_bladderurethra1.py | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py b/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py index f289b1c2..d58a0518 100644 --- a/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py +++ b/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py @@ -138,12 +138,12 @@ class MeshType_3d_bladderurethra1(Scaffold_base): }, 'meshEdits': exnodeStringFromNodeValues( [Node.VALUE_LABEL_VALUE, Node.VALUE_LABEL_D_DS1, Node.VALUE_LABEL_D_DS2, Node.VALUE_LABEL_D2_DS1DS2], [ - [[0.0000, 0.0000, 0.0000], [0.0000, 0.0154, 30.752], [0.0000, 0.5000, 0.0003], [0.0000, 0.0179, 0.0102]], - [[0.0000, 0.1469, 32.068], [0.0000, 0.2784, 33.382], [0.0000, 0.5000, 0.0042], [0.0000, 0.0179, 0.0181]], - [[0.0000, 0.5666, 66.756], [0.0000, 2.1900, 31.319], [0.0000, 0.5372, 0.0376], [0.0001, 0.0113, 0.0541]], - [[0.0000, 4.1370, 94.593], [0.0000, 6.1473, 29.506], [0.0000, 0.5272, 0.1098], [0.0000, 0.0382, 0.0822]], - [[0.0000, 13.121, 125.46], [0.0000, 11.416, 27.599], [0.0000, 0.4620, 0.1911], [0.0017, 0.0742, 0.1095]], - [[0.0000, 26.328, 149.56], [0.0000, 14.845, 20.395], [0.0000, 0.4043, 0.2942], [0.0044, 0.0800, 0.1341]], + [[0.0000, 0.0000, 0.0000], [0.0000, 0.2250, 17.323], [0.0000, 0.5000, -0.0021], [0.0000, -0.0169, 0.0094]], + [[0.0000, 0.1469, 19.303], [0.0000, 0.0688, 21.283], [0.0000, 0.5000, -0.0025], [0.0000, 0.0169, -0.0173]], + [[0.0000, 0.1203, 42.565], [0.0000, 0.6090, 27.172], [0.0000, 0.5380, -0.0244], [0.0000, 0.0170, -0.0500]], + [[0.0000, 1.5486, 73.616], [0.0000, 3.6838, 34.961], [0.0000, 0.5321, -0.0826], [0.0000, -0.0344, -0.0763]], + [[0.0000, 7.9441, 112.25], [0.0000, 9.5760, 29.552], [0.0000, 0.4708, -0.1681], [0.0000, -0.0605, -0.0951]], + [[0.0000, 18.116, 132.60], [0.0000, 10.257, 10.620], [0.0000, 0.4166, -0.2764], [0.0000, -0.0550, -0.1112]], ]), 'userAnnotationGroups': [ { @@ -280,12 +280,12 @@ class MeshType_3d_bladderurethra1(Scaffold_base): 'Number of elements along': 1, 'Unit scale': 1.0, 'Outlet': False, - 'Ostium diameter': 2.3, - 'Ostium length': 0.35, - 'Ostium wall thickness': 0.3, + 'Ostium diameter': 2.0, + 'Ostium length': 0.2, + 'Ostium wall thickness': 0.4, 'Use linear through ostium wall': True, 'Vessel end length factor': 2.0, - 'Vessel inner diameter': 1.3, + 'Vessel inner diameter': 0.8, 'Vessel wall thickness': 0.2, 'Vessel angle 1 degrees': 0.0, 'Vessel angle 1 spread degrees': 0.0, @@ -414,11 +414,11 @@ def getDefaultOptions(cls, parameterSetName='Default'): options['Urethra diameter 2'] = 0.1 options['Urethra wall thickness'] = 0.05 if 'Pig' in parameterSetName: - options['Major diameter'] = 30.0 - options['Minor diameter'] = 30.0 - options['Wall thickness'] = 0.3 - options['Neck diameter 1'] = 8.0 - options['Neck diameter 2'] = 7.5 + options['Major diameter'] = 25.0 + options['Minor diameter'] = 20.0 + options['Wall thickness'] = 0.4 + options['Neck diameter 1'] = 5.0 + options['Neck diameter 2'] = 4.0 options['Neck angle degrees'] = 25 options['Ureter position around'] = 0.67 # should be on the dorsal part (> 0.5) options['Ureter position down'] = 0.83 From a7d796e3c5edc51341cfb2c5ec624cdc974cf1a4 Mon Sep 17 00:00:00 2001 From: keeran97 <85910337+keeran97@users.noreply.github.com> Date: Thu, 5 Aug 2021 12:02:08 +1200 Subject: [PATCH 06/10] slightly resized human bladder --- src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py b/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py index d58a0518..3a34f899 100644 --- a/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py +++ b/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py @@ -389,7 +389,7 @@ def getDefaultOptions(cls, parameterSetName='Default'): if 'Human' in parameterSetName: options['Number of elements along bladder'] = 8 options['Number of elements around'] = 12 - options['Major diameter'] = 75.0 + options['Major diameter'] = 45.0 options['Minor diameter'] = 35.0 options['Wall thickness'] = 0.2 options['Neck diameter 1'] = 5.0 From 93cf400cb8fffcbcd9974ed5d2315b5e3d04566b Mon Sep 17 00:00:00 2001 From: keeran97 <85910337+keeran97@users.noreply.github.com> Date: Mon, 16 Aug 2021 11:00:16 +1200 Subject: [PATCH 07/10] reverted changes to current published bladders --- .../meshtypes/meshtype_3d_bladderurethra1.py | 116 ++++++++++-------- 1 file changed, 62 insertions(+), 54 deletions(-) diff --git a/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py b/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py index 3a34f899..da8cec52 100644 --- a/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py +++ b/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py @@ -38,29 +38,32 @@ class MeshType_3d_bladderurethra1(Scaffold_base): 'Coordinate dimensions': 3, 'D2 derivatives': True, 'Length': 1.0, - 'Number of elements': 5 + 'Number of elements': 8 }, 'meshEdits': exnodeStringFromNodeValues( [Node.VALUE_LABEL_VALUE, Node.VALUE_LABEL_D_DS1, Node.VALUE_LABEL_D_DS2, Node.VALUE_LABEL_D2_DS1DS2], [ - [[0.0000, 0.0000, 0.0000], [0.0000, 0.0000, 4.4964], [0.0000, 0.5000, -0.0000], [0.0000, -0.0000, 0.0008]], - [[0.0000, 0.0000, 6.0276], [0.0000, 0.0000, 7.5587], [0.0000, 0.5000, -0.0000], [0.0000, 0.0000, -0.0008]], - [[0.0000, 0.0000, 15.118], [0.0000, -0.0294, 14.699], [0.0000, 0.5000, -0.0016], [0.0000, -0.0001, -0.0065]], - [[0.0000, -0.0813, 35.426], [0.0000, 0.1628, 21.513], [0.0000, 0.4998, -0.0145], [0.0000, -0.0034, -0.0394]], - [[0.0000, 0.3532, 58.111], [0.0000, 3.4665, 21.596], [0.0000, 0.4913, -0.0925], [0.0000, -0.0155, -0.0775]], - [[0.0000, 6.5346, 78.130], [0.0000, 8.7668, 18.175], [0.0000, 0.4421, -0.2337], [0.0000, -0.0316, -0.0999]], + [[0.0000, 0.0000, 0.0000], [0.0000, 0.0000, 15.000], [0.0000, 0.5000, 0.00000], [0.0000, 0.0000, -0.5000]], + [[0.0000, 0.0000, 15.000], [0.0000, 0.0000, 15.000], [0.0000, 0.5000, 0.00000], [0.0000, 0.0000, -0.5000]], + [[0.0000, 0.0000, 30.000], [0.0000, 0.0000, 15.000], [0.0000, 0.5000, 0.00000], [0.0000, 0.0000, -0.5000]], + [[0.0000, 0.0000, 45.000], [0.0000, 0.0000, 15.000], [0.0000, 0.5000, 0.00000], [0.0000, 0.0000, -0.5000]], + [[0.0000, 0.1000, 60.450], [0.0000, 1.1000, 13.500], [0.0000, 0.5000, 0.00000], [0.0000, 0.0000, -0.5000]], + [[0.0000, 1.4200, 75.200], [0.0000, 1.4000, 13.200], [0.0000, 0.5000, 0.00000], [0.0000, 0.0000, -0.5000]], + [[0.0000, 3.0500, 89.940], [0.0000, 1.8000, 15.400], [0.0000, 0.5000, 0.00000], [0.0000, 0.0000, -0.5000]], + [[0.0000, 5.9800, 107.94], [0.0000, 4.5000, 16.800], [0.0000, 0.5000, 0.00000], [0.0000, 0.0000, -0.5000]], + [[0.0000, 12.470, 127.07], [0.0000, 6.6700, 14.800], [0.0000, 0.5000, 0.00000], [0.0000, 0.0000, -0.5000]] ]), 'userAnnotationGroups': [ { '_AnnotationGroup': True, 'dimension': 1, - 'identifierRanges': '1-3', + 'identifierRanges': '1-4', 'name': get_bladder_term('urinary bladder')[0], 'ontId': get_bladder_term('urinary bladder')[1] }, { '_AnnotationGroup': True, 'dimension': 1, - 'identifierRanges': '4-5', + 'identifierRanges': '5-8', 'name': get_bladder_term('urethra')[0], 'ontId': get_bladder_term('urethra')[1] }] @@ -70,29 +73,32 @@ class MeshType_3d_bladderurethra1(Scaffold_base): 'Coordinate dimensions': 3, 'D2 derivatives': True, 'Length': 1.0, - 'Number of elements': 5 + 'Number of elements': 8 }, 'meshEdits': exnodeStringFromNodeValues( [Node.VALUE_LABEL_VALUE, Node.VALUE_LABEL_D_DS1, Node.VALUE_LABEL_D_DS2, Node.VALUE_LABEL_D2_DS1DS2], [ - [[0.0000, 0.0000, 0.0000], [0.0000, 0.0000, 20.000], [0.0000, 0.5000, 0.0000], [0.0000, 0.0000, 0.0000]], - [[0.0000, 0.0000, 20.000], [0.0000, 0.0000, 20.000], [0.0000, 0.5000, 0.0000], [0.0000, 0.0000, 0.0000]], - [[0.0000, 0.0000, 40.000], [0.0000, 0.0000, 30.003], [0.0000, 0.5000, 0.0000], [0.0000, -0.0000, 0.0028]], - [[0.0000, 0.0000, 80.000], [0.0000, 1.8911, 40.202], [0.0000, 0.4993, -0.0254], [0.0000, -0.0002, 0.0080]], - [[0.0000, 3.8000, 120.30], [0.0000, 1.2771, 30.329], [0.0000, 0.4996, -0.0190], [0.0000, -0.0018, 0.0279]], - [[0.0000, 3.6000, 140.50], [0.0000, -1.6581, 9.9571], [0.0000, 0.4977, -0.0480], [0.0000, -0.0034, 0.0483]], + [[0.0000, 0.0000, 0.0000], [0.0000, 0.0000, 20.000], [0.0000, 0.5000, 0.0000], [0.0000, 0.0000, -0.5000]], + [[0.0000, 0.0000, 20.000], [0.0000, 0.0000, 20.000], [0.0000, 0.5000, 0.0000], [0.0000, 0.0000, -0.5000]], + [[0.0000, 0.0000, 40.000], [0.0000, 0.0000, 20.000], [0.0000, 0.5000, 0.0000], [0.0000, 0.0000, -0.5000]], + [[0.0000, 0.0000, 60.000], [0.0000, 0.0000, 20.000], [0.0000, 0.5000, 0.0000], [0.0000, 0.0000, -0.5000]], + [[0.0000, 0.0000, 80.000], [0.0000, 0.3000, 17.700], [0.0000, 0.5000, 0.0000], [0.0000, 0.0000, -0.5000]], + [[0.0000, -2.1000, 100.60], [0.0000, -1.9000, 17.200], [0.0000, 0.5000, 0.0000], [0.0000, 0.0000, -0.5000]], + [[0.0000, -3.8000, 120.30], [0.0000, -0.6000, 18.800], [0.0000, 0.5000, 0.0000], [0.0000, 0.0000, -0.5000]], + [[0.0000, -3.6000, 140.50], [0.0000, 2.0000, 18.400], [0.0000, 0.5000, 0.0000], [0.0000, 0.0000, -0.5000]], + [[0.0000, 0.0000, 160.00], [0.0000, 4.0000, 15.500], [0.0000, 0.5000, 0.0000], [0.0000, 0.0000, -0.5000]] ]), 'userAnnotationGroups': [ { '_AnnotationGroup': True, 'dimension': 1, - 'identifierRanges': '1-3', + 'identifierRanges': '1-4', 'name': get_bladder_term('urinary bladder')[0], 'ontId': get_bladder_term('urinary bladder')[1] }, { '_AnnotationGroup': True, 'dimension': 1, - 'identifierRanges': '4-5', + 'identifierRanges': '5-8', 'name': get_bladder_term('urethra')[0], 'ontId': get_bladder_term('urethra')[1] }] @@ -166,29 +172,32 @@ class MeshType_3d_bladderurethra1(Scaffold_base): 'Coordinate dimensions': 3, 'D2 derivatives': True, 'Length': 1.0, - 'Number of elements': 5 + 'Number of elements': 8 }, 'meshEdits': exnodeStringFromNodeValues( [Node.VALUE_LABEL_VALUE, Node.VALUE_LABEL_D_DS1, Node.VALUE_LABEL_D_DS2, Node.VALUE_LABEL_D2_DS1DS2], [ - [[0.0000, 0.0000, 0.000000], [0.0000, 0.0000, 0.8141], [0.0000, 0.5000, -0.0185], [0.0000, 0.0000, 0.0000]], - [[0.0000, 0.0000, 1.232100], [0.0000, 0.0000, 1.6501], [0.0000, 0.5000, 0.0036], [0.0000, 0.0000, 0.0000]], - [[0.0000, 0.0000, 3.300200], [0.0000, 0.0000, 1.9664], [0.0000, 0.5000, 0.0006], [0.0000, -0.0002, 0.0086]], - [[0.0000, 0.0000, 5.164900], [0.0000, -0.0334, 2.3482], [0.0000, 0.4995, 0.0222], [0.0000, -0.0006, -0.0093]], - [[0.0000, -0.0806, 7.995376], [0.0000, 0.0855, 2.7595], [0.0000, 0.4990, -0.0270], [0.0000, -0.0217, -0.1032]], - [[0.0000, 0.1622, 10.672070], [0.0000, 0.3991, 2.5873], [0.0000, 0.4514, -0.2014], [0.0000, -0.0611, -0.2082]], + [[0.000, 0.0000, 0.0000], [0.0000, -0.0219, 18.928], [0.0000, 0.5000, 0.0006], [0.0000, 0.0001, -0.0062]], + [[0.000, 0.1095, 17.595], [0.0000, 0.2409, 16.260], [0.0000, 0.4999, -0.0074], [0.0000, -0.0000, -0.0051]], + [[0.000, 0.4589, 32.519], [0.0000, 0.3415, 14.001], [0.0000, 0.4999, -0.0122], [0.0000, -0.0000, 0.0018]], + [[0.000, 0.7906, 45.597], [0.0000, 0.0678, 13.290], [0.0000, 0.5000, -0.0026], [0.0000, -0.0060, 0.0568]], + [[0.000, 0.5862, 59.093], [0.0000, -0.5418, 13.798], [0.0000, 0.4969, 0.0553], [0.0000, -0.0080, 0.0623]], + [[0.000, -0.3075, 73.183], [0.0000, -1.1224, 13.895], [0.0000, 0.4921, 0.0884], [0.0000, 0.0061, -0.0646]], + [[0.000, -1.6517, 86.875], [0.0000, -0.5654, 14.673], [0.0000, 0.5000, 0.0047], [0.0000, -0.0038, -0.1421]], + [[0.000, -1.3262, 102.46], [0.0000, 1.8796, 15.041], [0.0000, 0.4872, -0.1123], [0.0000, -0.0646, -0.1586]], + [[0.000, 1.9903, 116.76], [0.0000, 4.7166, 13.462], [0.0000, 0.4510, -0.2159], [0.0000, -0.1378, -0.1893]] ]), 'userAnnotationGroups': [ { '_AnnotationGroup': True, 'dimension': 1, - 'identifierRanges': '1-3', + 'identifierRanges': '1-4', 'name': get_bladder_term('urinary bladder')[0], 'ontId': get_bladder_term('urinary bladder')[1] }, { '_AnnotationGroup': True, 'dimension': 1, - 'identifierRanges': '4-5', + 'identifierRanges': '5-8', 'name': get_bladder_term('urethra')[0], 'ontId': get_bladder_term('urethra')[1] }] @@ -202,13 +211,13 @@ class MeshType_3d_bladderurethra1(Scaffold_base): 'Number of elements along': 1, 'Unit scale': 1.0, 'Outlet': False, - 'Ostium diameter': 2.0, - 'Ostium length': 0.3, - 'Ostium wall thickness': 0.4, + 'Ostium diameter': 2.2, + 'Ostium length': 0.5, + 'Ostium wall thickness': 0.5, 'Use linear through ostium wall': True, 'Vessel end length factor': 2.0, - 'Vessel inner diameter': 0.7, - 'Vessel wall thickness': 0.2, + 'Vessel inner diameter': 0.8, + 'Vessel wall thickness': 0.25, 'Vessel angle 1 degrees': 0.0, 'Vessel angle 1 spread degrees': 0.0, 'Vessel angle 2 degrees': 0.0, @@ -306,13 +315,13 @@ class MeshType_3d_bladderurethra1(Scaffold_base): 'Number of elements along': 1, 'Unit scale': 1.0, 'Outlet': False, - 'Ostium diameter': 0.5, - 'Ostium length': 0.05, + 'Ostium diameter': 1.0, + 'Ostium length': 0.25, 'Ostium wall thickness': 0.02, 'Use linear through ostium wall': True, 'Vessel end length factor': 2.0, - 'Vessel inner diameter': 0.1, - 'Vessel wall thickness': 0.05, + 'Vessel inner diameter': 0.3, + 'Vessel wall thickness': 0.1, 'Vessel angle 1 degrees': 0.0, 'Vessel angle 1 spread degrees': 0.0, 'Vessel angle 2 degrees': 0.0, @@ -363,17 +372,17 @@ def getDefaultOptions(cls, parameterSetName='Default'): 'Number of elements along bladder': 12, 'Number of elements around': 12, 'Number of elements through wall': 1, - 'Major diameter': 20.0, - 'Minor diameter': 15.0, - 'Neck diameter 1': 4.0, - 'Neck diameter 2': 3.0, - 'Wall thickness': 0.4, + 'Major diameter': 30.0, + 'Minor diameter': 25.0, + 'Neck diameter 1': 5.0, + 'Neck diameter 2': 4.0, + 'Wall thickness': 0.5, 'Neck angle degrees': 45, 'Include urethra': True, 'Number of elements along urethra': 8, - 'Urethra diameter 1': 1.0, - 'Urethra diameter 2': 0.7, - 'Urethra wall thickness': 0.4, + 'Urethra diameter 1': 1.5, + 'Urethra diameter 2': 1.0, + 'Urethra wall thickness': 0.5, 'Include ureter': False, 'Ureter': copy.deepcopy(ureterOption), 'Ureter position around': 0.67, # should be on the dorsal part (> 0.5) @@ -389,7 +398,7 @@ def getDefaultOptions(cls, parameterSetName='Default'): if 'Human' in parameterSetName: options['Number of elements along bladder'] = 8 options['Number of elements around'] = 12 - options['Major diameter'] = 45.0 + options['Major diameter'] = 75.0 options['Minor diameter'] = 35.0 options['Wall thickness'] = 0.2 options['Neck diameter 1'] = 5.0 @@ -426,17 +435,16 @@ def getDefaultOptions(cls, parameterSetName='Default'): options['Urethra diameter 2'] = 1.0 options['Urethra wall thickness'] = 0.25 if 'Rat' in parameterSetName: - options['Major diameter'] = 3.5 - options['Minor diameter'] = 2.5 - options['Wall thickness'] = 0.1 - options['Neck diameter 1'] = 0.5 - options['Neck diameter 2'] = 0.5 - options['Neck angle degrees'] = 25 + options['Major diameter'] = 20.0 + options['Minor diameter'] = 15.0 + options['Wall thickness'] = 0.2 + options['Neck diameter 1'] = 3.5 + options['Neck diameter 2'] = 3.0 options['Ureter position around'] = 0.67 # should be on the dorsal part (> 0.5) options['Ureter position down'] = 0.83 - options['Urethra diameter 1'] = 0.1 - options['Urethra diameter 2'] = 0.1 - options['Urethra wall thickness'] = 0.05 + options['Urethra diameter 1'] = 0.75 + options['Urethra diameter 2'] = 0.65 + options['Urethra wall thickness'] = 0.25 return options @staticmethod From 19021f68913e70ea90971e6807af79dca76d4297 Mon Sep 17 00:00:00 2001 From: keeran97 <85910337+keeran97@users.noreply.github.com> Date: Mon, 16 Aug 2021 11:39:36 +1200 Subject: [PATCH 08/10] resized mouse and pig bladder (all species 1 unit sized) --- .../meshtypes/meshtype_3d_bladderurethra1.py | 70 ++++++++++--------- 1 file changed, 38 insertions(+), 32 deletions(-) diff --git a/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py b/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py index da8cec52..1493b166 100644 --- a/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py +++ b/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py @@ -108,29 +108,32 @@ class MeshType_3d_bladderurethra1(Scaffold_base): 'Coordinate dimensions': 3, 'D2 derivatives': True, 'Length': 1.0, - 'Number of elements': 5 + 'Number of elements': 8 }, 'meshEdits': exnodeStringFromNodeValues( [Node.VALUE_LABEL_VALUE, Node.VALUE_LABEL_D_DS1, Node.VALUE_LABEL_D_DS2, Node.VALUE_LABEL_D2_DS1DS2], [ - [[0.0000, 0.0000, 0.0000], [0.0000, 0.0301, 0.8134], [0.0000, 0.5000, 0.0000], [0.0000, 0.0000, -0.0204]], - [[0.0000, 0.0000, 1.2321], [0.0000, -0.0120, 1.6504], [0.0000, 0.5000, 0.0000], [0.0000, 0.0001, -0.0093]], - [[0.0000, 0.0000, 3.3002], [0.0000, -0.0024, 1.9672], [0.0000, 0.5000, 0.0000], [0.0000, -0.0001, 0.0105]], - [[0.0000, 0.0000, 5.1649], [0.0000, -0.1043, 2.3452], [0.0000, 0.4997, 0.0163], [0.0000, -0.0004, -0.0039]], - [[0.0000, -0.3056, 7.9736], [0.0000, 0.1381, 2.5534], [0.0000, 0.4987, -0.0319], [0.0000, -0.0157, -0.0861]], - [[0.0000, 0.1840, 10.193], [0.0000, 0.8202, 1.8381], [0.0000, 0.4573, -0.1876], [0.0000, -0.0400, -0.1607]], + [[0.000, 0.0000, 0.0000], [0.0000, 0.2107, 19.185], [0.0000, 0.5000, 0.0006], [0.0000, -0.0002, -0.0098]], + [[0.000, 0.1095, 17.595], [0.0000, 0.0083, 16.005], [0.0000, 0.4999, -0.0074], [0.0000, -0.0000, -0.0062]], + [[0.000, 0.0347, 32.009], [0.0000, 0.0042, 13.831], [0.0000, 0.4999, -0.0122], [0.0000, 0.0001, 0.0027]], + [[0.000, 0.1115, 45.257], [0.0000, -0.0207, 13.330], [0.0000, 0.5000, -0.0026], [0.0000, -0.0015, 0.0336]], + [[0.000, -0.0079, 58.668], [0.0000, -0.0381, 13.242], [0.0000, 0.4996, 0.0196], [0.0000, -0.0040, 0.0453]], + [[0.000, 0.0332, 71.739], [0.0000, -0.2969, 13.684], [0.0000, 0.4983, 0.0403], [0.0000, 0.0013, -0.0227]], + [[0.000, -0.6320, 86.026], [0.0000, -0.5928, 14.006], [0.0000, 0.4997, 0.0193], [0.0000, -0.0027, -0.1007]], + [[0.000, -1.1544, 99.742], [0.0000, 0.7147, 16.377], [0.0000, 0.4961, -0.0620], [0.0000, -0.0226, -0.1114]], + [[0.000, 1.2247, 118.63], [0.0000, 4.0316, 21.331], [0.0000, 0.4719, -0.1653], [0.0000, -0.0498, -0.0958]] ]), 'userAnnotationGroups': [ { '_AnnotationGroup': True, 'dimension': 1, - 'identifierRanges': '1-3', + 'identifierRanges': '1-4', 'name': get_bladder_term('urinary bladder')[0], 'ontId': get_bladder_term('urinary bladder')[1] }, { '_AnnotationGroup': True, 'dimension': 1, - 'identifierRanges': '4-5', + 'identifierRanges': '5-8', 'name': get_bladder_term('urethra')[0], 'ontId': get_bladder_term('urethra')[1] }] @@ -140,29 +143,32 @@ class MeshType_3d_bladderurethra1(Scaffold_base): 'Coordinate dimensions': 3, 'D2 derivatives': True, 'Length': 1.0, - 'Number of elements': 5 + 'Number of elements': 8 }, 'meshEdits': exnodeStringFromNodeValues( [Node.VALUE_LABEL_VALUE, Node.VALUE_LABEL_D_DS1, Node.VALUE_LABEL_D_DS2, Node.VALUE_LABEL_D2_DS1DS2], [ - [[0.0000, 0.0000, 0.0000], [0.0000, 0.2250, 17.323], [0.0000, 0.5000, -0.0021], [0.0000, -0.0169, 0.0094]], - [[0.0000, 0.1469, 19.303], [0.0000, 0.0688, 21.283], [0.0000, 0.5000, -0.0025], [0.0000, 0.0169, -0.0173]], - [[0.0000, 0.1203, 42.565], [0.0000, 0.6090, 27.172], [0.0000, 0.5380, -0.0244], [0.0000, 0.0170, -0.0500]], - [[0.0000, 1.5486, 73.616], [0.0000, 3.6838, 34.961], [0.0000, 0.5321, -0.0826], [0.0000, -0.0344, -0.0763]], - [[0.0000, 7.9441, 112.25], [0.0000, 9.5760, 29.552], [0.0000, 0.4708, -0.1681], [0.0000, -0.0605, -0.0951]], - [[0.0000, 18.116, 132.60], [0.0000, 10.257, 10.620], [0.0000, 0.4166, -0.2764], [0.0000, -0.0550, -0.1112]], + [[0.0000, 0.0000, 0.0000], [0.0000, 0.3967, 17.118], [0.0000, 0.4999, -0.0116], [0.0000, 0.0002, 0.0084]], + [[0.0000, 0.2526, 16.482], [0.0000, 0.1084, 15.844], [0.0000, 0.5000, -0.0034], [0.0000, 0.0001, 0.0073]], + [[0.0000, 0.2277, 31.687], [0.0000, -0.1005, 16.250], [0.0000, 0.5000, 0.0031], [0.0000, 0.0180, 0.0030]], + [[0.0000, 0.0421, 48.982], [0.0000, -0.1616, 17.639], [0.0000, 0.5385, 0.0049], [0.0000, 0.0162, 0.0406]], + [[0.0000, -0.0945, 66.965], [0.0000, -0.4986, 17.987], [0.0000, 0.5378, 0.0276], [0.0000, -0.0051, 0.0509]], + [[0.0000, -0.9552, 84.946], [0.0000, -0.6462, 18.734], [0.0000, 0.5374, 0.0334], [0.0000, -0.0173, -0.0718]], + [[0.0000, -1.3669, 104.42], [0.0000, 0.5462, 17.118], [0.0000, 0.4994, -0.0233], [0.0000, -0.0266, -0.1269]], + [[0.0000, -0.1150, 119.12], [0.0000, 2.7663, 14.068], [0.0000, 0.4902, -0.0980], [0.0000, -0.0116, -0.0490]], + [[0.0000, 4.0321, 132.37], [0.0000, 5.4802, 12.315], [0.0000, 0.4691, -0.1728], [0.0000, 0.0080, 0.0382]], ]), 'userAnnotationGroups': [ { '_AnnotationGroup': True, 'dimension': 1, - 'identifierRanges': '1-3', + 'identifierRanges': '1-4', 'name': get_bladder_term('urinary bladder')[0], 'ontId': get_bladder_term('urinary bladder')[1] }, { '_AnnotationGroup': True, 'dimension': 1, - 'identifierRanges': '4-5', + 'identifierRanges': '5-8', 'name': get_bladder_term('urethra')[0], 'ontId': get_bladder_term('urethra')[1] }] @@ -263,13 +269,13 @@ class MeshType_3d_bladderurethra1(Scaffold_base): 'Number of elements along': 1, 'Unit scale': 1.0, 'Outlet': False, - 'Ostium diameter': 0.5, - 'Ostium length': 0.05, + 'Ostium diameter': 1.0, + 'Ostium length': 0.25, 'Ostium wall thickness': 0.02, 'Use linear through ostium wall': True, 'Vessel end length factor': 2.0, - 'Vessel inner diameter': 0.1, - 'Vessel wall thickness': 0.05, + 'Vessel inner diameter': 0.3, + 'Vessel wall thickness': 0.1, 'Vessel angle 1 degrees': 0.0, 'Vessel angle 1 spread degrees': 0.0, 'Vessel angle 2 degrees': 0.0, @@ -411,20 +417,20 @@ def getDefaultOptions(cls, parameterSetName='Default'): options['Urethra diameter 2'] = 1.0 options['Urethra wall thickness'] = 0.5 if 'Mouse' in parameterSetName: - options['Major diameter'] = 3.0 - options['Minor diameter'] = 2.5 - options['Wall thickness'] = 0.1 - options['Neck diameter 1'] = 0.5 - options['Neck diameter 2'] = 0.5 + options['Major diameter'] = 20.0 + options['Minor diameter'] = 15.0 + options['Wall thickness'] = 0.2 + options['Neck diameter 1'] = 4.0 + options['Neck diameter 2'] = 3.5 options['Neck angle degrees'] = 25 options['Ureter position around'] = 0.67 # should be on the dorsal part (> 0.5) options['Ureter position down'] = 0.83 - options['Urethra diameter 1'] = 0.1 - options['Urethra diameter 2'] = 0.1 - options['Urethra wall thickness'] = 0.05 + options['Urethra diameter 1'] = 0.75 + options['Urethra diameter 2'] = 0.65 + options['Urethra wall thickness'] = 0.25 if 'Pig' in parameterSetName: - options['Major diameter'] = 25.0 - options['Minor diameter'] = 20.0 + options['Major diameter'] = 30.0 + options['Minor diameter'] = 25.0 options['Wall thickness'] = 0.4 options['Neck diameter 1'] = 5.0 options['Neck diameter 2'] = 4.0 From 6c8a2ca317ff217c167f72557bd4d6d7aae4ef34 Mon Sep 17 00:00:00 2001 From: keeran97 <85910337+keeran97@users.noreply.github.com> Date: Tue, 17 Aug 2021 10:51:34 +1200 Subject: [PATCH 09/10] reduced number of elements along bladder (for pig and mouse) and resized appropriately --- .../meshtypes/meshtype_3d_bladderurethra1.py | 36 +++++++++++-------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py b/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py index 1493b166..7ecbf4d0 100644 --- a/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py +++ b/src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py @@ -269,12 +269,12 @@ class MeshType_3d_bladderurethra1(Scaffold_base): 'Number of elements along': 1, 'Unit scale': 1.0, 'Outlet': False, - 'Ostium diameter': 1.0, + 'Ostium diameter': 1.3, 'Ostium length': 0.25, - 'Ostium wall thickness': 0.02, + 'Ostium wall thickness': 0.3, 'Use linear through ostium wall': True, 'Vessel end length factor': 2.0, - 'Vessel inner diameter': 0.3, + 'Vessel inner diameter': 0.45, 'Vessel wall thickness': 0.1, 'Vessel angle 1 degrees': 0.0, 'Vessel angle 1 spread degrees': 0.0, @@ -300,7 +300,7 @@ class MeshType_3d_bladderurethra1(Scaffold_base): 'Ostium wall thickness': 0.4, 'Use linear through ostium wall': True, 'Vessel end length factor': 2.0, - 'Vessel inner diameter': 0.8, + 'Vessel inner diameter': 0.9, 'Vessel wall thickness': 0.2, 'Vessel angle 1 degrees': 0.0, 'Vessel angle 1 spread degrees': 0.0, @@ -413,41 +413,49 @@ def getDefaultOptions(cls, parameterSetName='Default'): options['Neck angle degrees'] = 115 options['Ureter position around'] = 0.82 # should be on the dorsal part (> 0.5) options['Ureter position down'] = 0.63 + options['Number of elements along urethra'] = 8 options['Urethra diameter 1'] = 1.5 options['Urethra diameter 2'] = 1.0 options['Urethra wall thickness'] = 0.5 if 'Mouse' in parameterSetName: + options['Number of elements along bladder'] = 8 options['Major diameter'] = 20.0 options['Minor diameter'] = 15.0 - options['Wall thickness'] = 0.2 + options['Wall thickness'] = 0.5 options['Neck diameter 1'] = 4.0 - options['Neck diameter 2'] = 3.5 - options['Neck angle degrees'] = 25 + options['Neck diameter 2'] = 3.0 + options['Neck angle degrees'] = 45 options['Ureter position around'] = 0.67 # should be on the dorsal part (> 0.5) - options['Ureter position down'] = 0.83 + options['Number of elements along urethra'] = 6 + options['Ureter position down'] = 0.865 options['Urethra diameter 1'] = 0.75 options['Urethra diameter 2'] = 0.65 options['Urethra wall thickness'] = 0.25 if 'Pig' in parameterSetName: + options['Number of elements along bladder'] = 8 options['Major diameter'] = 30.0 options['Minor diameter'] = 25.0 - options['Wall thickness'] = 0.4 - options['Neck diameter 1'] = 5.0 - options['Neck diameter 2'] = 4.0 - options['Neck angle degrees'] = 25 + options['Wall thickness'] = 0.5 + options['Neck diameter 1'] = 6.0 + options['Neck diameter 2'] = 5.5 + options['Neck angle degrees'] = 45 options['Ureter position around'] = 0.67 # should be on the dorsal part (> 0.5) - options['Ureter position down'] = 0.83 - options['Urethra diameter 1'] = 1.0 + options['Ureter position down'] = 0.865 + options['Number of elements along urethra'] = 6 + options['Urethra diameter 1'] = 1.25 options['Urethra diameter 2'] = 1.0 options['Urethra wall thickness'] = 0.25 if 'Rat' in parameterSetName: + options['Number of elements along bladder'] = 12 options['Major diameter'] = 20.0 options['Minor diameter'] = 15.0 options['Wall thickness'] = 0.2 options['Neck diameter 1'] = 3.5 options['Neck diameter 2'] = 3.0 + options['Neck angle degrees'] = 45 options['Ureter position around'] = 0.67 # should be on the dorsal part (> 0.5) options['Ureter position down'] = 0.83 + options['Number of elements along urethra'] = 8 options['Urethra diameter 1'] = 0.75 options['Urethra diameter 2'] = 0.65 options['Urethra wall thickness'] = 0.25 From f271f412e2fde37411213c318dc683f72d0887e4 Mon Sep 17 00:00:00 2001 From: keeran97 <85910337+keeran97@users.noreply.github.com> Date: Tue, 17 Aug 2021 15:39:10 +1200 Subject: [PATCH 10/10] added a tolerance for cross product and ensured vector sd2 is normalised --- src/scaffoldmaker/utils/tubemesh.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scaffoldmaker/utils/tubemesh.py b/src/scaffoldmaker/utils/tubemesh.py index b1c53864..cc552fd3 100644 --- a/src/scaffoldmaker/utils/tubemesh.py +++ b/src/scaffoldmaker/utils/tubemesh.py @@ -155,8 +155,8 @@ def warpSegmentPoints(xList, d1List, d2List, segmentAxis, if n1 == 0: # Find angle between xCentroidRot and first node in the face vectorToFirstNode = [xRot1[c] - centroidRot[c] for c in range(3)] if vector.magnitude(vectorToFirstNode) > 0.0: - cp = vector.crossproduct3(vector.normalise(vectorToFirstNode), sd2[nAlongSegment]) - if vector.magnitude(cp) > 1e-12: + cp = vector.crossproduct3(vector.normalise(vectorToFirstNode), vector.normalise(sd2[nAlongSegment])) + if vector.magnitude(cp) > 1e-7: cp = vector.normalise(cp) signThetaRot2 = vector.dotproduct(unitTangent, cp) thetaRot2 = math.acos(