[vtkusers] Filling a hole

Darshan Pai vtk_darshan at yahoo.com
Wed Mar 15 16:32:19 EST 2006


I have a Brain MRI dataset which I cut into halp using a clipPolyData Class.
 Since I cut off from the medial plane. THere is a hole where the cut is made and I can look in the interior. I want to fill up this hole with a fake surface.
 
 What will be the best method to do that ..
 
 Currently I am trying to do this . But I doesnt work for me.
 
       
vtkPolyDataNormals *normals = vtkPolyDataNormals::New();  normals->SetInput(leftMRI);   vtkClipPolyData *clipData =  vtkClipPolyData::New();  clipData->SetInput(normals->GetOutput());  clipData->SetClipFunction(yzPlane);  clipData->GenerateClipScalarsOn();  clipData->GenerateClippedOutputOn();  clipData->SetValue(0);  clipData->Update();   vtkCutter *cut = vtkCutter::New();  cut->SetInput(normals->GetOutput());  cut->SetCutFunction(yzPlane);  cut->GenerateCutScalarsOn();  cut->SetValue(0,0);   vtkStripper *cutStrips = vtkStripper::New();  cutStrips->SetInput(cut->GetOutput());  cutStrips->Update();       vtkPolyData *cutPoly  = vtkPolyData::New();  cutPoly->SetPoints(cutStrips->GetOutput()->GetPoints());  cutPoly->SetPolys(cutStrips->GetOutput()->GetLines());  cutPoly->Update();   vtkTriangleFilter *cutTriangle = vtkTriangleFilter::New();  cutTriangle->SetInput(cutPoly);  //cutTriangle->PassLinesOff();  //cutStrips->Delete();  //cut->Delete();   vtkAppendPolyData *append =
 vtkAppendPolyData::New();  append->AddInput(clipData->GetOutput());  append->AddInput(cutTriangle->GetOutput());  append->Update();  leftMRI->ShallowCopy(append->GetOutput());  leftMRI->Update();  

Any ideas

Darshan


 
		
---------------------------------
Yahoo! Mail
Bring photos to life! New PhotoMail  makes sharing a breeze. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060315/654044a5/attachment.htm>


More information about the vtkusers mailing list