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

BUG: Fix warnings when vtkMRMLModelNode has no mesh data #7750

Merged
merged 1 commit into from
May 20, 2024

Conversation

Sunderlandkyl
Copy link
Member

Fixes warnings during rendering such as:

Algorithm vtkPassThrough (00000223357FFBC0) returned failure for request: vtkInformation (000002233CEA6520)

Fixed by enabling AllowNullInput on the vtkPassThrough in vtkMRMLModelDisplayNode.

This commit also fixes an issue where the views would not be immediately rendered when vtkMRMLModelNode::SetAndObserveMesh(nullptr) was called for a model node that previously had a mesh. Fixed by requesting a render in vtkMRMLModelDisplayableManager whenever an actor that was previously visible is no longer displayable.

Copy link
Contributor

@lassoan lassoan left a comment

Choose a reason for hiding this comment

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

Thank you, it looks good, I just added one comment inline.

lassoan
lassoan previously approved these changes May 17, 2024
Copy link
Contributor

@lassoan lassoan left a comment

Choose a reason for hiding this comment

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

Looks great, thank you!

@lassoan lassoan enabled auto-merge (rebase) May 17, 2024 19:24
Fixes warnings during rendering such as:

> Algorithm vtkPassThrough (00000223357FFBC0) returned failure for request: vtkInformation (000002233CEA6520)

Fixed by enabling AllowNullInput on the vtkPassThrough in vtkMRMLModelDisplayNode.

This commit also fixes an issue where the views would not be immediately rendered when vtkMRMLModelNode::SetAndObserveMesh(nullptr) was called for a model node that previously had a mesh.
Fixed by not returning early and accounting for IsModelDisplayable in OnMRMLDisplayableModelNodeModifiedEvent.
continue;
{
// Optimization: no need to search any further.
break;
Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed an issue that I just noticed in IsModelDisplayable. Should be break not continue.

@lassoan lassoan disabled auto-merge May 17, 2024 21:02
@lassoan lassoan enabled auto-merge (rebase) May 17, 2024 21:02
Copy link
Contributor

@lassoan lassoan left a comment

Choose a reason for hiding this comment

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

Good catch. All looks good.

@lassoan lassoan merged commit 426fd08 into Slicer:main May 20, 2024
5 checks passed
@Sunderlandkyl Sunderlandkyl deleted the null_model_polydata_fix branch May 21, 2024 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants