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

Add support for JFRC2/JFRC2010 template brain #10

Open
jefferis opened this issue Jul 18, 2020 · 0 comments
Open

Add support for JFRC2/JFRC2010 template brain #10

jefferis opened this issue Jul 18, 2020 · 0 comments

Comments

@jefferis
Copy link
Collaborator

jefferis commented Jul 18, 2020

@bogovicj has made a bridging registration from JRC2018F to JFRC2010. JFRC2010 is normally considered an alias for JFRC2, the VFB template. However for somewhat obscure reasons the template that John was given at Janelia had a 1µm spacing in Z whereas the one that is available externally has isotropic voxel size 0.622088 µm.

The simplest way that I have found to deal with this is to treat JFRC2010 and JFRC2 as different templates and to add an affine bridging registration between the two to handle this anisotropic scale difference. Unfortunately this means that registration paths involving this template are 1 step longer than they should be.

This is compounded by a somewhat similar issue with the FAFB14 brain (which must be rescaled from nm to µm) meaning that the FAFB14-JFRC2 is two steps longer than necessary. Until xform_brain and friends become more intelligent e.g. natverse/nat#387 and natverse/nat.templatebrains#46 the best workaround is to specify JFRC2010 in the via argument:

# make sure you start a clean R session
library(nat.jrcbrains)
library(catmaid)
vfb=catmaid_login(server="https://fafb.catmaid.virtualflybrain.org")
da1pns=read.neurons.catmaid('name:DA1', conn=vfb)
# new path
da1pns.jfrc2v1<- xform_brain(da1pns, reference=JFRC2, sample="FAFB14", via = c("FAFB14um", 'JFRC2010'))
# best that has been available until now
da1pns.jfrc2v2<- xform_brain(da1pns, reference=JFRC2, sample="FAFB14", via = c("FAFB14um", "JFRC2013"))
nopen3d()
plot3d(JFRC2)
plot3d(da1pns.jfrc2v1, col='red')
plot3d(da1pns.jfrc2v2, col='green')
nview3d('frontal', zoom=.6)

# to watch out for, the elmr package can give a low quality registration
library(elmr)
da1pns.jfrc2v3<- xform_brain(da1pns, reference=JFRC2, sample="FAFB14", via = "JFRC2013")
plot3d(da1pns.jfrc2v3, col='blue')

image

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

No branches or pull requests

1 participant