Coder Social home page Coder Social logo

aind-ccf-registration's People

Contributors

camilolaiton avatar galenlynch avatar github-actions[bot] avatar jtyoung84 avatar nal10 avatar sharmishtaa avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

aind-ccf-registration's Issues

Publish to PyPI

User story

As a user, I want the repo published to pypi, so I can pip install the package.

Acceptance criteria

  • When a PR is merged into main, a github action will publish the latest version to pypi.

Sprint Ready Checklist

    • Acceptance criteria defined
    • Team understands acceptance criteria
    • Team has defined solution / steps to satisfy acceptance criteria
    • Acceptance criteria is verifiable / testable
    • External / 3rd Party dependencies identified
    • Ticket is prioritized and sized

Notes

Add any helpful notes here.

Forward and reverse output

In the current CCF registration code, we are defining the Allen CCF template to be the "fixed" image and the (downsampled) SmartSPIM data as the "moving" image. ANTs then computes (amongst other things):

  • forward transform (fwdtransforms: Transforms to move from moving to fixed image.)
  • inverse transform (invtransforms: Transforms to move from fixed to moving image.)
    These definitions (from ANTsPy) are confusing to read - so many "moves."
    We use the "SyN" type of transform, so each of these have an affine + deformable component

The current registration code outputs:

  • fwdtransforms[1] to the affine_transforms_file
  • invtransforms[1] to the warp_transforms_file
    This is a bit weird, saving one component from each transform, but not all components from either. I guess it works for the quantification capsule because the affine gets inverted there (I think I can see that in the quantification capsule, but I don't have repo access so I can't link here. It's on quantification.py line 82).
    aside: I don't really understand why the fixed -> moving transform (inverse) deformation field correctly moves points from the original data space into the CCF...

The reason I bring this to the attention of the group is to advocate storing both forward and reverse transforms.
It may be useful, for example, to see the original high resolution data with the CCF boundaries present.
At the moment, this would require moving the full resolution image into CCF space (or at least a higher resolution version of it).
With the complete transform, you could transform a specific annotated region mask into the raw data space, then look at cell segmentation, counting, etc. in the raw data. I admit that this may be an edge case.

Suggested Changes
Either:

  1. Output the affine and warp transforms from the same (I guess inverse??? but seems like it should be forward) transform that will allow transforming original data into CCF space. This is just a more consistent version of what is happening, I think. This would be a choice to enforce always working in CCF space. aside: can we save the whole transform in one file and apply it in one step?
  2. Output both components of both forward and reverse transforms for completeness. These are both already computed, so the only reason not to do this is if the displacement array occupies a lot of disk space.

Let me tag @camilolaiton and @sharmishtaa , since I know they both work on registration.

Autobump semantic version number

User story

As a developer, I want github actions to manage the semantic version, so I don't have to worry about it.

Acceptance criteria

  • When a PR is merged into main, a github action will automatically increment the version based on the commit message.

Sprint Ready Checklist

    • Acceptance criteria defined
    • Team understands acceptance criteria
    • Team has defined solution / steps to satisfy acceptance criteria
    • Acceptance criteria is verifiable / testable
    • External / 3rd Party dependencies identified
    • Ticket is prioritized and sized

Notes

Add any helpful notes here.

Default parameters have incorrect spacing.

It looks like the ants_params:{"Spacing"} parameters are applied incorrectly when loading the light sheet volume into ants. The volume is flipped to match the CCF, but the parameters are set as though the volume is in its original smartspim configuration.

The solution is probably either to change the spacing parameters, e.g. (14.4,16,14.4) instead of the current (14.4,14.4,16) OR to reorder the parameters when they are set as the ants spacing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.