Skip to content

Commit

Permalink
Clean up code
Browse files Browse the repository at this point in the history
  • Loading branch information
mlin865 committed Dec 11, 2024
1 parent e7a27bb commit 392d42f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 7 additions & 0 deletions src/scaffoldmaker/meshtypes/meshtype_3d_spinalnerve1.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ def checkOptions(cls, options):
options[key] = 0.1
elif options[key] > 0.9:
options[key] = 0.9
for key, angleRange in {
"Pitch angle degrees": (-60.0, 60.0)
}.items():
if options[key] < angleRange[0]:
options[key] = angleRange[0]
elif options[key] > angleRange[1]:
options[key] = angleRange[1]
return dependentChanges

@classmethod
Expand Down
5 changes: 2 additions & 3 deletions src/scaffoldmaker/meshtypes/meshtype_3d_trigeminalnerve1.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Generates a 3D body coordinates using tube network mesh.
Generates a 3D trigeminal nerve scaffold using tube network mesh.
"""
from cmlibs.maths.vectorops import cross, mult, set_magnitude, sub
from cmlibs.utils.zinc.field import Field, find_or_create_field_coordinates
Expand Down Expand Up @@ -116,12 +116,12 @@ def generateBaseMesh(cls, region, options):
:param options: Dict containing options. See getDefaultOptions().
:return: [] empty list of AnnotationGroup, NetworkMesh
"""
# parameterSetName = options['Base parameter set']
structure = options["Structure"]
halfNerveThickness = 0.5 * options["Trigeminal nerve thickness"]

nerveRootLength = options["Trigeminal nerve root length"]
halfNerveRootWidth = 0.5 * options["Trigeminal nerve root width"]

trigeminalGanglionLength = options["Trigeminal ganglion length"]
halfTrigeminalGanglionWidth = 0.5 * options["Trigeminal ganglion width"]

Expand Down Expand Up @@ -232,7 +232,6 @@ def generateBaseMesh(cls, region, options):

nerveJunctionNodeIdentifier = nodeIdentifier - 1
xJunction = x
# print('Junction', nerveJunctionNodeIdentifier)

# Mandibular and ophthlamic nerves
for nerve in ("mandibular", "ophthalmic"):
Expand Down

0 comments on commit 392d42f

Please sign in to comment.