Skip to content

Conversation

@mgeplf
Copy link
Collaborator

@mgeplf mgeplf commented May 23, 2025

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

mgeplf added 6 commits May 23, 2025 11:04
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
@mgeplf mgeplf force-pushed the brain-atlas branch 4 times, most recently from 160bbcf to 4dd7614 Compare May 23, 2025 09:53
@mgeplf mgeplf marked this pull request as ready for review May 23, 2025 13:11
@mgeplf mgeplf force-pushed the brain-atlas branch 3 times, most recently from 9a47610 to ece8bbf Compare May 26, 2025 08:39
Comment on lines 41 to 44
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)
Copy link
Contributor

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?

Copy link
Collaborator Author

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),
Copy link
Collaborator

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.

Copy link
Collaborator Author

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.

@mgeplf mgeplf merged commit c084740 into main May 26, 2025
1 check passed
@mgeplf mgeplf deleted the brain-atlas branch May 26, 2025 11:28
jdcourcol pushed a commit that referenced this pull request May 26, 2025
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
jdcourcol pushed a commit that referenced this pull request May 26, 2025
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
mgeplf added a commit that referenced this pull request May 27, 2025
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants