allen-cell-animated / website-3d-cell-viewer

Other
5 stars 4 forks source link

feat: Use new URL parameter schema #253

Closed ShrimpCryptid closed 4 months ago

ShrimpCryptid commented 4 months ago

Closes #249! This is marked as priority so we can get this feature to Matheus.

Estimated review size: medium, 20-30 minutes (about 250 lines are just unit tests)

Changes

Implements the new URL schema, where channels settings are defined as c{n}=key:value,key:value where n is some integer index of the channel. Key/value pairs are stored as a comma-separated list, with key-values separated by colons.

Testing

  1. Clone the branch and start the dev server.
  2. Open the following link locally: http://localhost:9020/viewer?url=https%3A%2F%2Fdev-aics-dtp-001.int.allencell.org%2F%2Fassay-dev%2Fcomputational%2Fdata%2Frelease%2Fnuc-morph-data%2Fdata_for_analysis%2Fperturbations%2Fimportazole%2FLaminB1%2Fcontrol%2F20230417_01%2Fraw.ome.zarr%2Chttps%3A%2F%2Fdev-aics-dtp-001.int.allencell.org%2F%2Fassay-dev%2Fcomputational%2Fdata%2Frelease%2Fnuc-morph-data%2Fdata_for_analysis%2Fperturbations%2Fimportazole%2FLaminB1%2Fcontrol%2F20230417_01%2Fseg.ome.zarr&c0=ven:0&c1=ven:1,lut:autoij:&c2=ven:1,clz:1&view=Z

The key part is at the end! Just to make it a little clearer:

c0=ven:0              // disable volume
c1=ven:1,lut:autoij:  // enable volume, use autoij on lut
c2=ven:1,clz:1         // enable volume, enable colorize (cz)
  1. Test one more link, which tests all of the URL properties: http://localhost:9020/viewer?url=https%3A%2F%2Fdev-aics-dtp-001.int.allencell.org%2F%2Fassay-dev%2Fcomputational%2Fdata%2Frelease%2Fnuc-morph-data%2Fdata_for_analysis%2Fperturbations%2Fimportazole%2FLaminB1%2Fcontrol%2F20230417_01%2Fraw.ome.zarr%2Chttps%3A%2F%2Fdev-aics-dtp-001.int.allencell.org%2F%2Fassay-dev%2Fcomputational%2Fdata%2Frelease%2Fnuc-morph-data%2Fdata_for_analysis%2Fperturbations%2Fimportazole%2FLaminB1%2Fcontrol%2F20230417_01%2Fseg.ome.zarr&c0=ven:1,col:ff0000,clz:1,cza:0.55,isa:0.3,isv:28,lut:0:100,ven:1,sen:1
    volume: enabled
    surface: enabled
    colorize: enabled
    colorize alpha: 0.5
    surface isovalue: 28
    surface opacity: 0.3 (~76)
    color: #ff0000 (red)
    lut: control points at 0 and 100
ShrimpCryptid commented 4 months ago

Noticing a possible bug where the autoIJ or default behavior are in the right relative position, but are offset slightly: image

After pressing "Reset": image

Is this a known bug or something new?

toloudis commented 4 months ago

Is this a known bug or something new?

Not sure exactly how you arrived at the first image, but I think clicking "Reset" should have the result that you posted in the 2nd image so that part looks right.

ShrimpCryptid commented 4 months ago

Is this a known bug or something new?

Not sure exactly how you arrived at the first image, but I think clicking "Reset" should have the result that you posted in the 2nd image so that part looks right.

First image was from doing an empty lut::. I also get a similar bug even with AutoIJ though, where it seems to be in the right relative position but is shifted when AutoIJ is clicked again. You can see it in the test link I included on the PR.