Skip to content

Conversation

@viktorpm
Copy link
Member

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?

To support generating the WHS SD rat atlas using the SWC female rat template as the reference image, in addition to the existing Waxholm/NITRC workflow.

What does this PR do?

  • Adds dual-mode support via swc_female_template flag:
    • SWC mode: Uses SWC female rat template, downloads individual files from GIN with hash verification
    • Waxholm/NITRC mode: Original workflow using zip archives (unchanged)
  • Refactors download functions to support both modes
  • Simplifies mesh creation by using construct_meshes_from_annotation()
  • Adds reference stack normalization for SWC template mode
  • Updates orientation to "pir" for SWC mode (not sure why it is pir, source image has to be checked)
  • Bumps version to 3

How has this PR been tested?

It was run interactively on an HPC node

Is this a breaking change?

no

Does this PR require an update to the documentation?

Likely

Checklist:

  • The code has been tested locally
  • Tests have been added to cover all new functionality (unit & integration)
  • The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

- SWC Female Template mode (True): Uses SWC female rat template as reference, from GIN repository
- Waxholm/NITRC mode (False): Original workflow using zip archives from NITRC
- Refactor download functions, add `download_swc_template_file()`
- Use `construct_meshes_from_annotation()`
- Add reference stack normalization for SWC template mode (uint16 scaling)
- Bump version to 3
)
STRUCTURES_ILF_HASH = None
else:
ORIENTATION = "lpi"
Copy link
Member Author

Choose a reason for hiding this comment

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

Users are allowed to switch between modes using the swc_female_template flag

@viktorpm viktorpm marked this pull request as ready for review December 15, 2025 09:54
@viktorpm viktorpm requested a review from adamltyson December 15, 2025 09:58
@adamltyson
Copy link
Member

Hi @viktorpm, I think it would be better for the code for this new atlas to be in it's own file. Although there's a lot of shared code with the "original" Waxholm, I think it would be easier to understand if they were seperated.

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.

3 participants