-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/colors for fish dataset #77
Conversation
defaultSurfacesOn={[]} | ||
initialChannelSettings={props.initialChannelSettings} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes in this file propagate the dataset's 3d viewer settings down into the actual viewer.
"4": { color: [255, 255, 255] }, | ||
}, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes in this file show the new dataset-dependent settings. Really, nearly ALL of this file should be in json in the dataset itself and none of it should be hardcoded here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also note that we can actually pick custom channel colors quite easily here. initialChannelSettings
also gives some control over the initial thresholding settings but I didn't expose it here in these changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes in this file show the new dataset-dependent settings. Really, nearly ALL of this file should be in json in the dataset itself and none of it should be hardcoded here.
Do we have a Jira issue for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I doubt it. I'll make one if there isn't
@@ -26,6 +26,8 @@ export interface VolumeViewerProps { | |||
cellDownloadHref: string; | |||
channelNameMapping?: { label: string; test: RegExp }[] | ""; | |||
groupToChannelNameMap?: { [key: string]: string[] } | ""; | |||
channelsEnabled?: number[]; | |||
initialChannelSettings?: { [key: string]: { color: [number, number, number] } }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these two fields had to be added to match up with props passed to the 3d viewer.
"hoverClosestCartesian" as "hoverClosestCartesian", | ||
"hoverCompareCartesian" as "hoverCompareCartesian", | ||
"toggleSpikelines" as "toggleSpikelines", | ||
"sendDataToCloud" as const, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't seen this before, why is this needed? (and why not "string" or what it was before)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh is it the same as const sendDataToCloud = "sendDataToCloud"
and then saying type sendDataToCloud = typeof sendDataToCloud
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was one of the linting fixes. there's a eslint rule that says to prefer const
. I tried removing the as const
but that was definitely still a typeCheck fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making the linter work / fixing errors!
Problem
The FISH dataset was showing a poorly selected set of channels for its 3d display of images.
Solution
We decided what channels and colors to use for the fish dataset. I set the colors in our codebase in a section that lets us make choices based on the name of the dataset selected.
Unfortunately I also had to update the eslint / parser versions and then patch up a whole bunch of linter warnings and errors.
Type of change
Change summary:
I will highlight this with comments in the PR at key points in the code.
Steps to Verify: