vanvalenlab / kiosk-frontend

DeepCell web application built using NodeJS, Express, React, and Webpack.
Other
1 stars 0 forks source link

Add scale functionality to frontend #165

Closed ngreenwald closed 3 years ago

ngreenwald commented 3 years ago

We previously had rescaling incorporated into the frontend as part of the scale-detection module. The user had a checkbox for "rescale automatically" or "manually rescale." If the manual option was selected, then a textbox appeared that allowed the user to enter a scale factor.

This UI was a bit confusing. It wasn't clear what automatic scale detection was, or what the units of the manual rescaling were, whether it was necessary or not, etc.

However, given that people will be providing data outside of the expected scale range, having this functionality in place on the website would be quite useful. In particular, I think having a multiplicative factor makes the most sense. We can tell users that the model expects data of xx resolution, and if they would like to supply data of a smaller or larger resolution, they can indicate the requested scale factor to align their data with the expectations of the model.

willgraf commented 3 years ago

Enabling scaling is very easy to do, but it sounds like we need to refactor the UI for the ScaleForm. Here's a screenshot of the old ScaleForm:

Screen Shot 2021-08-06 at 11 58 59 AM

Can you please help me draft what we would like it to look like instead?

ngreenwald commented 3 years ago

What do you/@MekWarrior think would be more intuitive? A dropdown saying "select the resolution your data was acquired at", with options for 10X, 20X (default), 40X, 60X? Or a dropdown saying "select how your data will be rescaled", with options for 0.5X, 1X (default), 1.5X, 2X, etc.

willgraf commented 3 years ago

A dropdown saying "select the resolution your data was acquired at", with options for 10X, 20X (default), 40X, 60X

This sounds pretty easy to me, but are we going to need to keep adding new NX resolutions to the dropdown? Or is the set of 4 you mentioned comprehensive?

If we expect there to be many more options, I think they should be able to input a value - though the correct multiplier value may not be very intuitive either.

ngreenwald commented 3 years ago

I don't think we'll need more options, we can say pick the closest one or something to that effect.

willgraf commented 3 years ago

Here's a couple mockups that feature both zoom and mpp values:

Screen Shot 2021-08-12 at 1 41 20 PM Screen Shot 2021-08-12 at 1 42 07 PM

Anything you like/don't like/want to see changed?

ngreenwald commented 3 years ago

That looks perfect, super clean