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

draft template-builder tutorial #252

Merged
merged 5 commits into from
Oct 10, 2024
Merged

Conversation

alessandrofelder
Copy link
Member

@alessandrofelder alessandrofelder commented Oct 8, 2024

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?

To improve and accelerate our template-building process, we would like to provide our anatomist collaborators with a tutorial on how to pre-process their data through a GUI.

What does this PR do?

Adds a template-builder tutorial.

Copy link
Member

@niksirbi niksirbi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @alessandrofelder!

I think my main feedback is that we should add more insructions to the brainglobe-space reorientation step. It's unclear how one would determine the source orientation is PLS by looking at the image in napari. I mean, I know how to do it, but would collaborators be able to do the same based on our instructions?

Other than that, this tutorial gave me some ideas to help streamline it:

  • publish the package on PyPI, to make installation easier
  • Maybe add a "downsample widget" at the top. It would allow you to choose your image path on disk (without loading it in napari), source/target resolutions, and path for the downsample image. Clicking a button would downsample an image, save to to disk, and load the downsample stack in napari (or perhaps there should be two buttons).

docs/source/tutorials/template-builder-pre-align.md Outdated Show resolved Hide resolved
docs/source/tutorials/template-builder-pre-align.md Outdated Show resolved Hide resolved
Brain templates are an average of many brain images. To compute this average, it is highly beneficial to roughly pre-align individual brain images. This makes the averaging a lot faster and more reliable.

The `brainglobe-template-builder` tool provides a Graphical User Interface to pre-align sample images to be used for template building later. It's an early work-in-progress tool, so you will have to install it from
Githubm via the command `pip install git+https://github.com/brainglobe/brainglobe-template-builder`. We recommend doing this in a separate conda environment.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: "Githubm".

Also probably we should just release the package on pip, to make the installation easier. But this can also be done later.

docs/source/tutorials/template-builder-pre-align.md Outdated Show resolved Hide resolved
docs/source/tutorials/template-builder-pre-align.md Outdated Show resolved Hide resolved
docs/source/tutorials/template-builder-pre-align.md Outdated Show resolved Hide resolved
docs/source/tutorials/template-builder-pre-align.md Outdated Show resolved Hide resolved
docs/source/tutorials/template-builder-pre-align.md Outdated Show resolved Hide resolved
@alessandrofelder
Copy link
Member Author

Still need to change the icon image in the index!


You can now move along each image axis and determine which anatomical axes this approximately corresponds to.

In our case, moving upwards along the dimension slider (axis 0) goes from posterior to anterior, so the first letter of orientation is P.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe phras it as "progressing along the dimension slider (axis 0)". I would avoid mentioning "upwards", "forwards" or "rightwards" here, to avoid confusion with the actual image or anatomy directions

Copy link
Member

@niksirbi niksirbi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the dropdown is fine for now, just made a few suggestions on wording.

Long term, we do need a separate tutorial for this I think, because it concerns brainglobe as a whole.

Maybe that tutorial could be about our space convention, how to identify your sample space (in napari), and how to change it to the brainglobe space (using the corresponding brainglobe-space package).

docs/source/tutorials/template-builder-pre-align.md Outdated Show resolved Hide resolved
docs/source/tutorials/template-builder-pre-align.md Outdated Show resolved Hide resolved
@niksirbi
Copy link
Member

niksirbi commented Oct 9, 2024

I've also opened an issue to remind ourselves to publish template-builder on PyPI.

@alessandrofelder alessandrofelder merged commit a192d72 into main Oct 10, 2024
3 checks passed
@alessandrofelder alessandrofelder deleted the template-builder-tutorial branch October 10, 2024 09:02
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.

2 participants