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

feat(contour api): add api for contour rendering configuration #443

Merged
merged 12 commits into from
Mar 28, 2023

Conversation

sedghi
Copy link
Member

@sedghi sedghi commented Feb 21, 2023

  • rename example to better represent Labelmap vs Contour segmentation representation
  • add contour segmentation representation visibility (for all its contour sets), and per contour set: visibility and thickness

@netlify
Copy link

netlify bot commented Feb 21, 2023

Deploy Preview for cornerstone-3d-docs ready!

Name Link
🔨 Latest commit ecbe8ee
🔍 Latest deploy log https://app.netlify.com/sites/cornerstone-3d-docs/deploys/642343715ce54200080024d1
😎 Deploy Preview https://deploy-preview-443--cornerstone-3d-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@sedghi sedghi requested a review from jbocce February 21, 2023 23:11
@jbocce
Copy link
Collaborator

jbocce commented Feb 23, 2023

I ran into an out of memory problem once for the contourrendering example. However, I have not seen it since...
image

Copy link
Collaborator

@jbocce jbocce left a comment

Choose a reason for hiding this comment

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

Just some minor comments with regards to running some examples. Otherwise looks good.

});

addSliderToToolbar({
title: 'Change Segment 2 Thickness For left viewport',
Copy link
Collaborator

Choose a reason for hiding this comment

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

JSYK... I tried the new example, but I found that the slider cannot be dragged all the way to the right. Is this expected?

image

@sedghi sedghi force-pushed the feat/remaining-rtss branch from 9bdb148 to 7021051 Compare March 23, 2023 21:42
Copy link
Collaborator

@jbocce jbocce left a comment

Choose a reason for hiding this comment

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

Looks good. Some minor comments.

@@ -123,17 +117,10 @@ function removeSegmentationRepresentation(
*/
async function render(
viewport: Types.IVolumeViewport,
representation: ToolGroupSpecificRepresentation,
representationConfig: ToolGroupSpecificRepresentation,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why was this renamed to config?

Copy link
Member Author

Choose a reason for hiding this comment

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

it is was named incorrectly before


const newOutlineWithActive = newContourConfig.outlineWidthActive;

if (cachedConfig.outlineWidthActive !== newOutlineWithActive) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a chance that cachedConfig might be undefined or null?

Copy link
Member Author

Choose a reason for hiding this comment

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

there shouldn't be since we add first, and that caches it, but I added the checks

packages/tools/src/tools/displayTools/Contour/utils.ts Outdated Show resolved Hide resolved
const type = contour.getType();

// creating a point index list that defines a line
const pointIndexes = pointList.map((_, i) => i + pointIndex);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Consider renaming i to pointListIndex or something.

Copy link
Collaborator

@jbocce jbocce left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks for the updates.

@sedghi sedghi changed the title feat(contour): add api for contour rendering configuration feat(contour api): add api for contour rendering configuration Mar 28, 2023
@sedghi sedghi merged commit 4ab751d into main Mar 28, 2023
@sedghi sedghi deleted the feat/remaining-rtss branch August 2, 2023 20:33
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