-
Notifications
You must be signed in to change notification settings - Fork 65
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
feat(vtkPiecewiseWidget): Support vertical movement of points #488
Conversation
✅ Deploy Preview for volview-dev ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
I am sorry about that, the values are fixed now! |
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.
LGTM!
Actually - one request, if the opacity value is 0, let's not cause it to shift (that is, only apply the increase/decrease to non-zero opacity values - zero should always remain zero. That way, the user will be able to select/threshold the background and change the non-zero opacities assigned to the data up/down without the background becoming an issue. |
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.
Please see follow-on comment for one more change request - zero opacity values should always remain zero, i.e., should not be shifted up/down.
Makes sense! I've pushed a change to handle this so only non-zero values are shifted. |
src/utils/vtk-helpers.ts
Outdated
// Non-zero values should be affected by shift | ||
// but preset values of zero should not | ||
const shifted = y - shiftAlpha; | ||
const yVal = y || shifted ? shifted : -1; |
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 certain || shifted is needed?
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.
Should also clip range?
0b2600b
to
9c8bc0d
Compare
Sorry for ambiguity of the review. I meant to specify that You can revert 9c8bc0d. As an aside, the naming of |
All issues I had found have been resolved. Works great!! |
Ah, I'm sorry for the misunderstanding there. That makes sense.
Agreed, the name is redundant. We're really just shifting the values so what about:
|
d021471
to
2a706ab
Compare
Still works great! This is an outstanding extension - can create exceptionally nice views quickly. One question - why CTRL and not SHIFT? s |
Great question! No reason, happy to change it to |
Funky... I'll check that out. |
2a706ab
to
63a32ab
Compare
One more bug - seems like the transfer function being used by the LOD-reduced rendering is not being updated - only the final / high-quality transfer function is being adjusted. You can see this by adjusting the opacity higher, and then moving the image - while moving it uses the un-adjusted transfer function with the LOD-reduced image. When you stop, it generates the high-quality image using the shifted opacities... |
055df79
to
d9c2986
Compare
All looks good to me! |
These names sound good to me. Let's go with these renames. |
Vertical shift is allowed when holding control and left-click+dragging up/down. Shifting the points changes opacity.
The opacity should be increased when the points are shifted up and decreased when shifted down.
d9c2986
to
dec6f82
Compare
dec6f82
to
a998a42
Compare
FYI: Still works great! |
LGTM! |
Vertical shift is allowed when holding control and left-click+dragging up/down. Shifting the points changes opacity.
Initial pass at fixing #188