Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tube network mesh refactor #259

Merged
merged 22 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
842ab5b
Add solid cylinder network scaffold
oneway1225 May 15, 2024
e748d72
Add network mesh builder base classes
rchristie May 25, 2024
acf7355
Add box network mesh builder
rchristie May 25, 2024
c97ccdc
Add tube network mesh builder
rchristie May 29, 2024
39518b4
Implement tube network mesh junction
rchristie Jun 9, 2024
2be1e69
Fix cross point derivatives, eft cases
rchristie Jun 10, 2024
24b247f
Update uterus2 to use tube network builder
rchristie Jun 13, 2024
b3c2939
Fix uterus broad ligament annotations
rchristie Jun 15, 2024
c8b0634
Implement tube network trifurcation
rchristie Jun 21, 2024
84e8c96
Improve segment sampling, trim surfaces
rchristie Jun 25, 2024
51a82f5
Handle tangential projections in find curve-surface intersections
rchristie Jun 25, 2024
05b54b7
Improve junction midpoint sampling
rchristie Jun 29, 2024
8084a14
Allow more element numbers around combinations
rchristie Jul 1, 2024
b17ad10
Fix tube segment, junction sampling
rchristie Jul 7, 2024
067c566
Make uterus2 human layout symmetric
rchristie Jul 16, 2024
ce4b310
Fix uterus symmetry and element spacing
rchristie Jul 19, 2024
d757339
Remove obsolute bifurcation code and scaffolds
rchristie Jul 19, 2024
8f93d21
Improve determine serendipity eft by updating deltas
rchristie Jul 21, 2024
055ede2
Fix and test tube trifurcations
rchristie Jul 21, 2024
eaa12c3
Rescale derivative in determine eft
rchristie Jul 22, 2024
b83a9e0
Fix minor issues from review
rchristie Jul 23, 2024
6fa0c07
Increment minor version
rchristie Jul 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/scaffoldmaker/annotation/uterus_terms.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
("dorsal top left horn", "None"),
("dorsal top right horn", "None"),
("external cervical os", "UBERON:0013760", "FMA:76836", "ILX:0736534"),
("fundus", "None"),
("fundus of uterus", "None"),
("internal cervical os", "UBERON:0013759", "FMA:17747", "ILX:0729495"),
("junction of left round ligament with uterus", "None"),
("junction of right round ligament with uterus", "None"),
Expand Down
16 changes: 7 additions & 9 deletions src/scaffoldmaker/meshtypes/meshtype_1d_network_layout1.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from cmlibs.zinc.field import Field, FieldGroup
from cmlibs.zinc.node import Node
from scaffoldmaker.meshtypes.scaffold_base import Scaffold_base
from scaffoldmaker.utils.networkmesh import NetworkMesh
from scaffoldmaker.utils.networkmesh import NetworkMesh, pathValueLabels
from scaffoldmaker.utils.interpolation import smoothCurveSideCrossDerivatives
from scaffoldmaker.utils.zinc_utils import clearRegion, get_nodeset_field_parameters, \
get_nodeset_path_ordered_field_parameters, make_nodeset_derivatives_orthogonal, \
Expand All @@ -27,7 +27,9 @@ class MeshType_1d_network_layout1(Scaffold_base):
"Bifurcation": "1-2.1,2.2-3,2.3-4",
"Converging bifurcation": "1-3.1,2-3.2,3.3-4",
"Loop": "1-2-3-4-5-6-7-8-1",
"Sphere cube": "1.1-2.1,1.2-3.1,1.3-4.1,2.2-5.2,2.3-6.1,3.2-6.2,3.3-7.1,4.2-7.2,4.3-5.1,5.3-8.1,6.3-8.2,7.3-8.3"
"Sphere cube": "1.1-2.1,1.2-3.1,1.3-4.1,2.2-5.2,2.3-6.1,3.2-6.2,3.3-7.1,4.2-7.2,4.3-5.1,5.3-8.1,6.3-8.2,7.3-8.3",
"Trifurcation": "1-2.1,2.2-3,2.3-4,2.4-5",
"Trifurcation cross": "1-3.1,2-3.2,3.2-4,3.1-5"
}

@classmethod
Expand Down Expand Up @@ -261,10 +263,6 @@ def assignCoordinates(cls, region, options, networkMesh, functionOptions, editGr
if not selectionMeshGroup.isValid():
print("Assign coordinates: Selection contains no elements. Clear it to assign globally.")
return False, False
valueLabels = [
Node.VALUE_LABEL_VALUE, Node.VALUE_LABEL_D_DS1,
Node.VALUE_LABEL_D_DS2, Node.VALUE_LABEL_D2_DS1DS2,
Node.VALUE_LABEL_D_DS3, Node.VALUE_LABEL_D2_DS1DS3]

with ChangeManager(fieldmodule):
# get all node parameters (from selection if any)
Expand All @@ -277,10 +275,10 @@ def assignCoordinates(cls, region, options, networkMesh, functionOptions, editGr
tmpMeshGroup = tmpGroup.createMeshGroup(mesh1d)
tmpMeshGroup.addElementsConditional(selectionGroup)
editNodeset = tmpGroup.getNodesetGroup(nodes)
_, originalNodeParameters = get_nodeset_field_parameters(editNodeset, toCoordinates, valueLabels)
_, originalNodeParameters = get_nodeset_field_parameters(editNodeset, toCoordinates, pathValueLabels)
del tmpMeshGroup
del tmpGroup
_, nodeParameters = get_nodeset_field_parameters(editNodeset, fromCoordinates, valueLabels)
_, nodeParameters = get_nodeset_field_parameters(editNodeset, fromCoordinates, pathValueLabels)

modifyVersions = None # default is to modify all versions
if selectionGroup:
Expand Down Expand Up @@ -324,7 +322,7 @@ def assignCoordinates(cls, region, options, networkMesh, functionOptions, editGr
for d in range(2, 6):
nNodeParameters[d][v] = oNodeParameters[d][v]

set_nodeset_field_parameters(editNodeset, toCoordinates, valueLabels, nodeParameters, editGroupName)
set_nodeset_field_parameters(editNodeset, toCoordinates, pathValueLabels, nodeParameters, editGroupName)
del editNodeset

return False, True # settings not changed, nodes changed
Expand Down
227 changes: 0 additions & 227 deletions src/scaffoldmaker/meshtypes/meshtype_2d_tubebifurcation1.py

This file was deleted.

Loading