Skip to content

Commit

Permalink
Merge branch 'main' of github.com:ABI-Software/scaffoldmaker
Browse files Browse the repository at this point in the history
  • Loading branch information
hsorby committed Apr 5, 2024
2 parents aafff2f + cfb68da commit 2735bc7
Show file tree
Hide file tree
Showing 34 changed files with 8,239 additions and 3,798 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def readfile(filename, split=False):
# minimal requirements listing
"cmlibs.maths >= 0.3",
"cmlibs.utils >= 0.6",
"cmlibs.zinc >= 4.0",
"cmlibs.zinc >= 4.1",
"scipy",
"numpy",
]
Expand Down
8 changes: 7 additions & 1 deletion src/scaffoldmaker/annotation/cecum_terms.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@

# convention: preferred name, preferred id, followed by any other ids and alternative names
cecum_terms = [
("caecum", "UBERON:0001153", "FMA:14541", "ILX:0732270")
("caecum", "UBERON:0001153", "FMA:14541", "ILX:0732270"),
("cecum mucosa", "UBERON:0000314", "FMA:14998", "ILX:0723957"),
("circular muscle layer of cecum", "ILX:0774843"),
("ileum part of cecum", "None"),
("longitudinal muscle layer of cecum", "ILX:0776047"),
("serosa of cecum", "ILX:0773223"),
("submucosa of cecum", "UBERON:0004927", "FMA:14999", "ILX:0725500")
]


Expand Down
6 changes: 6 additions & 0 deletions src/scaffoldmaker/annotation/smallintestine_terms.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,22 @@
# convention: preferred name, preferred id, followed by any other ids and alternative names
smallintestine_terms = [
("circular-longitudinal muscle interface of first segment of the duodenum along the gastric-omentum attachment", "ILX:0793090"),
("circular muscle layer of ileum", "ILX:0776561"),
("circular muscle layer of small intestine", "ILX:0772669"),
("duodenum", "UBERON:0002114", "FMA:7206", "ILX:0726125"),
("ileocecal junction", "UBERON:0001073", "FMA:11338", "ILX:0730012"),
("ileum", "UBERON:0002116", "FMA:7208", "ILX:0728151"),
("jejunum", "UBERON:0002115", "FMA:7207", "ILX:0724224"),
("longitudinal muscle layer of ileum", "ILX:0770304"),
("longitudinal muscle layer of small intestine", "ILX:0772125"),
("luminal surface of duodenum", "ILX:0793121"),
("mucosa of ileum", "ILX:0770578"),
("mucosa of small intestine", "UBERON:0001204", "FMA:14933", "ILX:0770578"),
("serosa of duodenum", "UBERON:0003336", "FMA:14948", "ILX:0732373"),
("serosa of ileum", "ILX:0774472"),
("serosa of small intestine", "UBERON:0001206", "FMA:14938", "ILX:0727465"),
("small intestine", "UBERON:0002108", "FMA:7200", "ILX:0726770"),
("submucosa of ileum", "UBERON:0004946", "FMA:14957", "ILX:0734297"),
("submucosa of small intestine", "UBERON:0001205", "FMA:14934", "ILX:0735609")
]

Expand Down
2 changes: 2 additions & 0 deletions src/scaffoldmaker/annotation/stomach_terms.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@
("distal point of lower esophageal sphincter serosa on the greater curvature of stomach", "ILX:0793179"),
("distal point of lower esophageal sphincter serosa on the lesser curvature of stomach", "ILX:0793180"),
("dorsal stomach", "ILX:0793086"),
("duodenum part of stomach", "None"),
("esophagogastric junction", "UBERON:0007650", "FMA: 9434", "ILX:0733910"),
("esophagogastric junction along the greater curvature on circular-longitudinal muscle interface", "ILX:0793098"),
("esophagogastric junction along the greater curvature on luminal surface", "ILX:0793099"),
("esophagogastric junction along the greater curvature on serosa", "ILX:0793100"),
("esophagogastric junction along the lesser curvature on circular-longitudinal muscle interface", "ILX:0793101"),
("esophagogastric junction along the lesser curvature on luminal surface", "ILX:0793102"),
("esophagogastric junction along the lesser curvature on serosa", "ILX:0793103"),
("esophagus part of stomach", "None"),
("forestomach-glandular stomach junction", "UBERON:0012270", "ILX:0729974"),
("fundus of stomach", "UBERON:0001160", " FMA:14559", "ILX:0724443"),
("fundus-body junction along the greater curvature on circular-longitudinal muscle interface", "ILX:0793104"),
Expand Down
2 changes: 1 addition & 1 deletion src/scaffoldmaker/meshtypes/meshtype_1d_network_layout1.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def generateBaseMesh(cls, region, options):
cd2[nodeIndexes[ln]].append(d2)
cd13[nodeIndexes[ln]].append(mult(d1Unit, edgeAngle * tubeRadius))
# fix the one node out of order:
for d in [cd1[4], cd2[4]]:
for d in [cd1[4], cd2[4], cd13[4]]:
d[0:2] = [d[1], d[0]]
for n in range(8):
node = nodes.findNodeByIdentifier(n + 1)
Expand Down
2 changes: 1 addition & 1 deletion src/scaffoldmaker/meshtypes/meshtype_2d_tubenetwork1.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def getOptionScaffoldPackage(cls, optionName, scaffoldType, parameterSetName=Non
@classmethod
def checkOptions(cls, options):
if not options["Network layout"].getScaffoldType() in cls.getOptionValidScaffoldTypes("Network layout"):
options["Network layout"] = cls.getOptionScaffoldPackage("Network layout")
options["Network layout"] = cls.getOptionScaffoldPackage("Network layout", MeshType_1d_network_layout1)
elementsCountAround = options["Elements count around"]
if options["Elements count around"] < 4:
options["Elements count around"] = 4
Expand Down
4 changes: 2 additions & 2 deletions src/scaffoldmaker/meshtypes/meshtype_3d_bladder1.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ def generateBaseMesh(cls, region, options):
bladderCoordinatesFieldName, elementsCountAround, elementsCountAlongBladder, elementsCountThroughWall,
annotationGroupsAround, annotationGroupsAlong, annotationGroupsThroughWall,
firstNodeIdentifier, firstElementIdentifier,
useCubicHermiteThroughWall, useCrossDerivatives, closedProximalEnd=True)
useCubicHermiteThroughWall, useCrossDerivatives, closedProximalEnd=True)[0:3]

bladderCoordinates = fm.findFieldByName(bladderCoordinatesFieldName)

Expand Down Expand Up @@ -1335,7 +1335,7 @@ def getBladderCoordinates(elementsCountAlongDome, elementsCountAlongNeck, elemen
xList, d1List, d2List, d3List, curvatureList = \
tubemesh.extrudeSurfaceCoordinates(xInner, d1Inner, d2Inner, d3Inner, wallThicknessList, relativeThicknessList,
elementsCountAround, elementsCountAlongBladder, elementsCountThroughWall,
transitElementList, outward=False)
transitElementList, outward=False)[0:5]

# Deal with multiple nodes at the start point for closed proximal end
n = elementsCountAround * (elementsCountThroughWall + 1)
Expand Down
16 changes: 7 additions & 9 deletions src/scaffoldmaker/meshtypes/meshtype_3d_bladderurethra1.py
Original file line number Diff line number Diff line change
Expand Up @@ -884,14 +884,12 @@ def generateBaseMesh(cls, region, options):
transitElementList = [0] * elementsCountAround

relativeThicknessList = []
xList, d1List, d2List, d3List, curvatureList = tubemesh.extrudeSurfaceCoordinates(xWarpedList, d1WarpedList,
d2WarpedList, d3WarpedUnitList,
wallThicknessList,
relativeThicknessList,
elementsCountAround,
elementsCountAlong,
elementsCountThroughWall,
transitElementList, outward=True)
xList, d1List, d2List, d3List, curvatureList = \
tubemesh.extrudeSurfaceCoordinates(xWarpedList, d1WarpedList, d2WarpedList, d3WarpedUnitList,
wallThicknessList, relativeThicknessList, elementsCountAround,
elementsCountAlong, elementsCountThroughWall, transitElementList,
outward=True)[0:5]

# Call the derivatives from the transition list to be replaced in the d2List
idx = elementsCountAlongBladder * elementsCountAround
for n2 in range(elementsCountThroughWall + 1):
Expand Down Expand Up @@ -1045,7 +1043,7 @@ def generateBaseMesh(cls, region, options):
elementsCountAround, elementsCountAlong, elementsCountThroughWall,
annotationGroupsAround, annotationGroupsAlong, annotationGroupsThroughWall,
firstNodeIdentifier, firstElementIdentifier,
useCubicHermiteThroughWall, useCrossDerivatives, closedProximalEnd=True)
useCubicHermiteThroughWall, useCrossDerivatives, closedProximalEnd=True)[0:3]

if includeUreter:
annotationGroups.append(ureterGroup)
Expand Down
Loading

0 comments on commit 2735bc7

Please sign in to comment.