From a9b2685d4bf32fa0be16d4dc594a0b7b8dcbbe1b Mon Sep 17 00:00:00 2001 From: apo Date: Thu, 1 Dec 2005 12:53:17 +0000 Subject: [PATCH] To apply deformation to segementation --- src/OBJECT/VISU_GaussPtsAct.cxx | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/OBJECT/VISU_GaussPtsAct.cxx b/src/OBJECT/VISU_GaussPtsAct.cxx index 592ccf2b..6ea09ae3 100644 --- a/src/OBJECT/VISU_GaussPtsAct.cxx +++ b/src/OBJECT/VISU_GaussPtsAct.cxx @@ -896,6 +896,13 @@ VISU_GaussPtsAct { VISU_GaussPointsPL* aPipeline = theActor->GetPipeLine(); + SALOME_ExtractGeometry* anExtractGeometry = aPipeline->GetExtractGeometryFilter(); + vtkImplicitFunction* anImplicitFunction = anExtractGeometry->GetImplicitFunction(); + + aPipeline->ShallowCopy(GetGaussPointsPL()); + + aPipeline->SetImplicitFunction(anImplicitFunction); // To restore + aPipeline->SetPrimitiveType( myInsideCursorSettings->GetPrimitiveType() ); aPipeline->SetClamp( myInsideCursorSettings->GetClamp() ); aPipeline->SetImageData( myInsideCursorSettings->GetTexture() ); @@ -1021,11 +1028,9 @@ VISU_GaussPtsAct1 myOutsideDeviceActor->GetPipeLine()->SetImplicitFunction(theWidgetCtrl->ImplicitFunction()); myOutsideDeviceActor->SetVisibility(GetVisibility() && theWidgetCtrl->GetEnabled()); - //note if (theWidgetCtrl->GetEnabled()) { myCurrentPL = myInsideDeviceActor->GetPipeLine(); } - // } Superclass::SetWidgetCtrl(theWidgetCtrl); @@ -1117,6 +1122,15 @@ VISU_GaussPtsAct1 { VISU_GaussPointsPL* aPipeline = myOutsideDeviceActor->GetPipeLine(); + SALOME_ExtractGeometry* anExtractGeometry = aPipeline->GetExtractGeometryFilter(); + vtkImplicitFunction* anImplicitFunction = anExtractGeometry->GetImplicitFunction(); + + aPipeline->ShallowCopy(GetGaussPointsPL()); + + aPipeline->SetImplicitFunction(anImplicitFunction); // To restore + anExtractGeometry->SetExtractBoundaryCells(true); + anExtractGeometry->SetExtractInside(true); + aPipeline->SetPrimitiveType( myOutsideCursorSettings->GetPrimitiveType() ); aPipeline->SetClamp( myOutsideCursorSettings->GetClamp() ); aPipeline->SetImageData( myOutsideCursorSettings->GetTexture() ); -- 2.39.2