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

Fix #194 and #15. Use world coordinates for synchronization. #275

Merged
merged 1 commit into from
Oct 5, 2015

Conversation

rdvincent
Copy link
Collaborator

This pull request is bigger than I might have liked, but solving the main issue (#15) required a major rethinking of how we handle the overlay volume.

To make synchronization work in world coordinates, we need a voxel-to-world and world-to-voxel transform for every potentially synced volume. This means the overlay needs these transforms. The overlay uses a simple, default MINC transform. This now gives the overlay volume most of the properties and methods formerly associated only with the MINC and NIfTI-1 volumes.

I did a little code cleanup while I was at it. Fixing #194 was easy once this was working.

viewer.syncPosition = function(panel, volume, axis_name) {
var wc = volume.getWorldCoords();
viewer.volumes.forEach(function(synced_volume) {
if (synced_volume !== volume) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe you can directly return:
if (synced_volume === volume) return ;

natacha-beck added a commit that referenced this pull request Oct 5, 2015
Fix #194 and #15. Use world coordinates for synchronization.
@natacha-beck natacha-beck merged commit 7c1cf41 into aces:master Oct 5, 2015
@rdvincent rdvincent deleted the rdv-sync-in-world branch October 6, 2015 12:52
joelthelion pushed a commit to TonyChizat/brainbrowser that referenced this pull request Apr 11, 2016
Fix aces#194 and aces#15. Use world coordinates for synchronization.
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.

2 participants