aces / brainbrowser

Web-based visualization tools for neurological data.
https://brainbrowser.cbrain.mcgill.ca/
GNU Affero General Public License v3.0
352 stars 124 forks source link

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

Closed rdvincent closed 9 years ago

rdvincent commented 9 years ago

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.