-
Notifications
You must be signed in to change notification settings - Fork 36
Fit trunk radius and orientation #273
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
Merged
Merged
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
9c6b302
Add centroid/epineurium to trunk/branch groups
rchristie 0b4cac5
read multiple trunk groups
v-chopovda 90ac1fb
Fit 1-D vagus trunk
rchristie 100b19e
Fit radius
rchristie 45c2ba7
new marker locations
v-chopovda bbd015d
Fix sample curve from points
rchristie 7cd1f89
Fit twist angle, clean up fitter fields
rchristie 5cbe51a
Fit vagus trunk orientation
rchristie 00f1764
Add level markers
rchristie 1eb9b8a
Add branches, reduce scale factors
rchristie 6153213
Merge pull request #2 from v-chopovda/update_input_data_reader
rchristie eecc730
Add realistic vagus test with orienation and radius
rchristie 3b01cad
Add material coordinates
rchristie b1d7043
Add code for material coordinates
rchristie b0b8353
Fix incorrect variable name
rchristie 626d8f0
Update fieldfitter dependency version
rchristie b1a0df8
Offset vagus marker nodes to 10001
rchristie 0896af9
Update cmlibs.utils dependency
rchristie 600997f
Add vagus straight coordinates
rchristie a18bb01
Restore vagus coordinates to +z direction, +x left, +y anterior
rchristie e5c4f34
Set vagus annotation ID pref UBERON > ILX > FMA
rchristie 93c3645
Test no FMA terms for vagus
rchristie b78a16c
Use urls for vagus annotation ids
rchristie b04d234
Add tests for reordered vagus trunk, currently failing
rchristie 96df6ad
trunk nodes ordering
v-chopovda d1534d5
Merge pull request #3 from v-chopovda/test-richard-nerve-orientation
rchristie 129cfa0
Fix branch start data and fit curvature
rchristie b3466d5
Improve test failure messages
rchristie ce8c72b
Reduce tolerance for branch of branch
rchristie f98badd
Further broaden tolerance
rchristie 3062792
Further broaden tolerance
rchristie 92b0696
Further broaden tolerance
rchristie a7b1a43
Further broaden tolerance
rchristie 7942cd5
Further broaden tolerance
rchristie 334ac6b
Further broaden tolerance
rchristie 6ddc65f
updated vagus scaffold documentation
v-chopovda 2e615d1
Ignore orientation points too far from centroid
rchristie 1d5c37c
Merge branch 'nerve-orientation' of github.com:rchristie/scaffoldmake…
v-chopovda ef557db
update vagus terms
v-chopovda 1d128b2
update vagus terms, documentation
v-chopovda 629ea7b
Merge pull request #4 from v-chopovda/test-richard-nerve-orientation
rchristie 61c51af
Fix annotation term typo
rchristie 2c7521c
Improve vagus documentation with images
rchristie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,10 +15,11 @@ authors = [ | |
{ name="Richard Christie", email="[email protected]" }, | ||
] | ||
dependencies = [ | ||
"cmlibs.maths >= 0.7.0", | ||
"cmlibs.utils >= 0.6", | ||
"cmlibs.zinc >= 4.1", | ||
"scaffoldfitter >= 0.9", | ||
"cmlibs.maths >= 0.7.1", | ||
"cmlibs.utils >= 0.12.5", | ||
"cmlibs.zinc >= 4.2.1", | ||
"fieldfitter >= 0.5.1", | ||
"scaffoldfitter >= 0.11.1", | ||
"scipy", | ||
"numpy" | ||
] | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
""" | ||
Utilities for working with annotations. | ||
""" | ||
import logging | ||
|
||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
def annotation_term_id_to_url(term): | ||
""" | ||
Convert short forms of annotation term ids into full urls e.g.: | ||
"UBERON:0000948" --> "http://purl.obolibrary.org/obo/UBERON_0000948" | ||
"ILX:0732254" --> "http://uri.interlex.org/base/ilx_0732254" | ||
"FMA:7088" --> "http://purl.org/sig/ont/fma/fma7088" | ||
Other namespaces should be added as needed, but until then are returned as is with a warning. | ||
:param term_name: | ||
:param term_id: String short form of annotation term id NAMESPACE:#. | ||
:return: term with id converted to url idfpossible. | ||
""" | ||
if not term[1]: | ||
logger.warning("annotation_term_id_to_url: Missing term id for annotation '" + term[0] + "'") | ||
return term | ||
if ":" not in term[1]: | ||
logger.error("annotation_term_id_to_url: Invalid annotation term id ('" + term[0] + "', '" + term[1] + "')") | ||
return term | ||
raw_prefix, number_str = term[1].split(":") | ||
prefix = raw_prefix.upper() | ||
if prefix == "UBERON": | ||
url_prefix = "http://purl.obolibrary.org/obo/UBERON_" | ||
elif prefix == "ILX": | ||
url_prefix = "http://uri.interlex.org/base/ilx_" | ||
elif prefix == "FMA": | ||
url_prefix = "http://purl.org/sig/ont/fma/fma" | ||
else: | ||
logger.warning("annotation_term_id_to_url: No url known for term ('" + term[0] + "', '" + term[1] + "')") | ||
return term | ||
return (term[0], url_prefix + number_str) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doc needs updating (we can do this later)