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 an example of visualising CMTK registrations #6

Open
jefferis opened this issue Sep 30, 2015 · 5 comments
Open

Add an example of visualising CMTK registrations #6

jefferis opened this issue Sep 30, 2015 · 5 comments

Comments

@jefferis
Copy link
Collaborator

No description provided.

@young24
Copy link

young24 commented Nov 14, 2019

Hello Dr. Jefferis. I'm a PhD student from Felsenberg Lab at FMI. In your previous image registration script, the links in the Data setup section are not valid. Can you help me get these sample data? I'm now trying to use your Natverse and other packages to do some fly brain image registration. I really like these packages they made. Thank you.

@jefferis
Copy link
Collaborator Author

Dear @young24, thanks for your interest in the natverse. The script in question is not really part of the nat.examples package (where all the scripts should run well in isolation) but captures the state of the analysis for a paper.

You should be able to replace the whole Data setup section with this. @jdmanton used specific paths on his local machine (like options(flycircuit.datadir = '~/projects/ChiangReanalysis/data/')) to avoid redownloading stuff but you don't need to.

message("Loading dps...")
dps <- load_fcdata('dpscanon')
options(nat.default.neuronlist = 'dps')
options(rgl.antialias = TRUE)

@young24
Copy link

young24 commented Nov 14, 2019

Dear @jefferis , thank you for your response. I tried your code to load the data. However, No brain showed up after I ran the par3d command, which is different from the picture in the script. Is that because the rds data was not loaded into the global environment?

@jefferis
Copy link
Collaborator Author

Hi Wenbin, which code did you try to run? par3d only sets features of the view (zoom, perspective etc), but doesn't plot anything itself. Are you trying to run these sections showing points before and after registration?

clear3d()
points3d(fcwb_orig, col='red', size=12)
points3d(fcwb_affine, col='cyan', size=12)
x <- c(0, 564.25)
y <- c(0, 326)
z <- matrix(c(60, 60, 60, 60), nrow=2)
persp3d(x,y,z, col='white', specular='black', texture='stack_slices/FCWBslice60.png', xlab='', ylab='', zlab='', box=F, axes=F, add=T)
par3d('userMatrix'=structure(c(1, 0, 0, 0, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 1), .Dim = c(4L, 4L)))

In that case you will need to uncompress the attached files to your working directory.

stack_slices.zip

If you are just trying to do a generic 3d plot, you should be able to do something like this and get a surface:

library(natverse)
clear3d()
plot3d(JFRC2)

More generally, I would recommend to come over to https://groups.google.com/forum/#!forum/nat-user and describe what you would like to do and I will try to give some advice that would help.

@young24
Copy link

young24 commented Nov 15, 2019

@jefferis thank you for your reply. I managed to show the brain slice. Now, I understand I didn't give the path to slice pictures...
I will go to the Google Group if I have further questions. Thank you again.

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

2 participants