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

Feature Request: contours() to work for labels #11

Open
nzxwang opened this issue Sep 11, 2019 · 1 comment
Open

Feature Request: contours() to work for labels #11

nzxwang opened this issue Sep 11, 2019 · 1 comment

Comments

@nzxwang
Copy link

nzxwang commented Sep 11, 2019

I'm not sure if we already have a good way to do this, but I haven't been able to find one yet. It would be nice to be able to display an anatomical image with overlayed contours calculated from the atlas registered to the respective image (or the image registered to the atlas). For example, If I am interested in seeing how well the hippocampus from the LSQ6 image registered to the MAGeT atlas:

sliceSeries(nrow = 4, ncol = 1, begin = 110, end=200) %>%
anatomy(volume = anatomy_in_atlas_space, low = min(anatomy_in_atlas_space), high = max(anatomy_in_atlas_space)) %>%
contours(volume = atlas_in_atlas_space, label_levels = hippocampus_labels)

where hippocampus_labels is a vector of all the labels of the hippocampal region.

My current hacky solution is to set all non-hippocampal values of atlas_in_atlas_space to a certain value, and set all hippocampal values to another value and set the levels argument to be a value between the two.

@nzxwang
Copy link
Author

nzxwang commented Oct 9, 2019

original runs:
20s for 5 images,
53s for 10 images,
169s for 20
~5400s for 134 images

having removed the round and replace:
8s for 5 images,
18s for 10 images
82s for 20

having further removed contours() entirely:
17s for 10 images

It seems that this problem is independent of rounding/replacing and contours(). MRIcrotome's sliceSeries() is n^2 in the number of slices which becomes a problem for hundreds of images

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