-
Notifications
You must be signed in to change notification settings - Fork 0
Feaute/multi channel color image #237
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
base: main
Are you sure you want to change the base?
Conversation
…ple color channel management split out color utils into its own file
…nts in MultiImageInputSelector and OperationWizard
…tionWizard with limits on channel addition/removal
…sn't unstack range slider and histrogram
… drawn, and fix some issues loading images in analysis view
| outputImage = new ImageData(payload.canvas.width, payload.canvas.height) | ||
| const outputImageData = outputImage.data | ||
| const numPixels = payload.canvas.width * payload.canvas.height * 4 | ||
| for (let j = 3; j < numPixels; j += 4) { |
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.
what's up with these values? magic numbers!
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.
magic pixel indices. The images are RGBA - 4 channels - and so that loop is just filling in every 4th value which is the alpha to 255. I can add a comment.
| if (colors.length > 0) { | ||
| // Set the first images color constributions as the base values | ||
| for (let j = 0; j < sharedArrays[0].length; j++) { | ||
| for (let c = 0; c < 3; c++) { |
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.
magic numbers here too
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.
more pixel/color channel indices...
| :min-inputs="MIN_COLOR_CHANNELS" | ||
| @insert-image="insertImage" | ||
| @remove-image="removeImage" | ||
| @add-channel="() => { |
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.
why are these not written as functions in the script?
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.
not really sure, I guess I'll move them into the script for readability
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.
A couple of magic numbers here and there, but it looks great. Nicely done, Jon
Multi color channel Images for Datalab Color Operations
TODO