Skip to content
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

fix: Dynamic threshold wasn't working in the beta branch #1470

Merged
merged 2 commits into from
Oct 1, 2024

Conversation

wayfarer3130
Copy link
Collaborator

Context

The preview wasn't showing at all for the dynamic threshold.

Changes & Results

The preview mode wasn't working, nor was the bidirectional auto-calculation for segmentations.
The changes are:

  • Don't reset changed slices array for preview mode
  • Record changed data when set data returns undefined as well as when it returns true
  • Enable the preview mode for the example

Testing

Run yarn example for

yarn example labelmapSegmentationDynamicThreshold
yarn example segmentBidirectionalTool

Checklist

PR

  • [] My Pull Request title is descriptive, accurate and follows the
    semantic-release format and guidelines.

Code

Public Documentation Updates

  • [] The documentation page has been updated as necessary for any public API
    additions or removals.

Tested Environment

  • [] "OS:
  • [] "Node version:
  • [] "Browser:

Copy link

netlify bot commented Sep 18, 2024

Deploy Preview for cornerstone-3d-docs failed. Why did it fail? →

Name Link
🔨 Latest commit 07c3f55
🔍 Latest deploy log https://app.netlify.com/sites/cornerstone-3d-docs/deploys/66eaf38d82844e00081f002e

@@ -129,7 +129,7 @@ export default class VoxelManager<T> {
*/
public setAtIndex = (index, v) => {
const changed = this._set(index, v);
if (changed) {
if (changed !== false) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The response is optional for the set method, as some set methods have no way to determine changed state - for those ones, assume it is changed always.

@sedghi sedghi merged commit c5ba018 into beta Oct 1, 2024
6 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants