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(coordinate_transform): use names from spec when constructing coordinate space transform #753

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chrisj
Copy link
Contributor

@chrisj chrisj commented Mar 12, 2025

Currently the use of the dimension index causes the next set spec to fail the validateDimensionNames check.

You can replicate the issue here by adding an additional output dimension here and reloading the page twice.

https://neuroglancer-demo.appspot.com/#!%7B%22dimensions%22:%7B%22x%22:%5B1.8e-8%2C%22m%22%5D%2C%22y%22:%5B1.8e-8%2C%22m%22%5D%2C%22z%22:%5B4.5e-8%2C%22m%22%5D%7D%2C%22position%22:%5B49263.15234375%2C49176.1328125%2C1694.5%5D%2C%22crossSectionScale%22:1.6791634573917904%2C%22projectionOrientation%22:%5B-0.00024565105559304357%2C-0.11311007291078568%2C0.00002710020635277033%2C0.9935824275016785%5D%2C%22projectionScale%22:131072%2C%22layers%22:%5B%7B%22type%22:%22image%22%2C%22source%22:%22gs://zheng_mouse_hippocampus_production/v2/img_aligned_sharded_18nm/%7Cneuroglancer-precomputed:%22%2C%22tab%22:%22source%22%2C%22name%22:%22img_aligned_sharded_18nm%22%2C%22visible%22:false%7D%5D%2C%22selectedLayer%22:%7B%22size%22:986%2C%22visible%22:true%2C%22layer%22:%22img_aligned_sharded_18nm%22%7D%2C%22layout%22:%224panel-alt%22%7D

The initial input names: [x', 'y', 'z', '']
Output names: ['x', 'y', 'z', "test'"]

On reload, set spec changes input names to [x', 'y', 'z',  3] and coordinateTransformSpecificationToJson changes the order to ['3', 'x', 'y', 'z'] because numerical properties are first and ordered from smallest to largest.

On second reload:
specInputNames = ['3', 'x', 'y', 'z']
newToSpecDimensionIndices = [1, 2, -1, 3]
Which results in newOutputNames = ['y', 'z', 'z', "test'"] and fails the validateDimensionNames check.

…dinate space transform

Currently the use of the dimension index causes the next set spec to fail the validateDimensionNames check.
@chrisj
Copy link
Contributor Author

chrisj commented Mar 12, 2025

Also I just noticed another issue, if you add two additional properties, it only creates one additional input space dimension so you end up with

Error parsing "source" property: Error parsing "transform" property: Error parsing "inputDimensions" property: Expected rank of 5, but received rank of: 4

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.

1 participant