-
Notifications
You must be signed in to change notification settings - Fork 0
Initial implementation of brain-atlas endpoints
#195
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
Conversation
See #168 for the specification. Briefly; a `BrainAtlas` is an named entity that has an asset `annotation.nrrd` attached to it. It is associated with a particular `BrainRegionHierarchy` In addition, `BrainAtlasRegion` gives metadata for all the regions within a `BrainAtlas`; * their volume in the `annotation.nrrd` if they are a leaf, -1 otherwise. * an attached asset with the .obj mesh
160bbcf to
4dd7614
Compare
9a47610 to
ece8bbf
Compare
| with ensure_result(error_message="Brain Region Hierarchy not found"): | ||
| stmt = sa.select(BrainRegionHierarchy).filter(BrainRegionHierarchy.id == id_) | ||
| row = db.execute(stmt).scalar_one() | ||
| return BrainRegionHierarchyRead.model_validate(row) |
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.
Minor: You could use the app.queries.common.router_read_one here too, right?
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.
ah, I was just fixing a typo, and wasn't really looking at this file.
| db_model_class=BrainAtlasRegion, | ||
| authorized_project_id=user_context.project_id, | ||
| response_schema_class=BrainAtlasRegionRead, | ||
| apply_operations=lambda q: q.filter(BrainAtlasRegion.brain_atlas_id == atlas_id), |
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.
Minor, can we use q.where instead of q.filter in new code here and at line 62?
They are aliases, but where is more similar to how the conditions is represented in the final query.
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.
let me try again, I think I did that the first time, but I'm not sure.
See #168 for the specification. Briefly; a `BrainAtlas` is an named entity that has an asset `annotation.nrrd` attached to it. It is associated with a particular `BrainRegionHierarchy` In addition, `BrainAtlasRegion` gives metadata for all the regions within a `BrainAtlas`; * their volume in the `annotation.nrrd` if they are a leaf, None otherwise. * an attached asset with the .obj mesh
See #168 for the specification. Briefly; a `BrainAtlas` is an named entity that has an asset `annotation.nrrd` attached to it. It is associated with a particular `BrainRegionHierarchy` In addition, `BrainAtlasRegion` gives metadata for all the regions within a `BrainAtlas`; * their volume in the `annotation.nrrd` if they are a leaf, None otherwise. * an attached asset with the .obj mesh
See #168 for the specification. Briefly; a `BrainAtlas` is an named entity that has an asset `annotation.nrrd` attached to it. It is associated with a particular `BrainRegionHierarchy` In addition, `BrainAtlasRegion` gives metadata for all the regions within a `BrainAtlas`; * their volume in the `annotation.nrrd` if they are a leaf, None otherwise. * an attached asset with the .obj mesh
See #168 for the specification.
Briefly; a
BrainAtlasis an named entity that has an assetannotation.nrrdattached to it. It is associated with a particularBrainRegionHierarchyIn addition,
BrainAtlasRegiongives metadata for all the regions within aBrainAtlas;annotation.nrrdif they are a leaf, -1 otherwise.