Hi,
I just loaded segment file nii.gz by API slicer.util.loadSegmentation, then
i want to hide this node named “post_result”
auto vesselNode = vtkMRMLSegmentationNode::SafeDownCast(
d->scene->GetFirstNodeByName("post_result")); //post_result
if (vesselNode == nullptr)
return;
vesselNode->SetDisplayVisibility(false);
qSlicerLayoutManager* layoutManager = qSlicerApplication::application()->layoutManager();
if (layoutManager == nullptr)
return;
for (auto viewName : layoutManager->sliceViewNames())
{
layoutManager->sliceWidget(viewName)->sliceView()->forceRender();
}
the segmentation mask is still displayed on slicer view.
But in “Data” Model, i can hide by click "eye"icon
How can i solve it ?
Thanks for help