[vtkusers] Re: PolyData Points Delete.
Dongqing Chen
dqchen at cvip.louisville.edu
Thu Sep 28 22:59:42 EDT 2006
Dear Goodwin and vtk users:
Thanks for your help. After I looked through the related parts, I wrote
my codes. Although there was no compile error, but some errors happened when
running the program.
Some code patches are listed below.
Pts saves the points what I want to delete from the original vtkPolyData
colonPolyp, now I generate the newcolonPolyp containing the new data after
deleting the undesired data from colonPolyp, then render and display the
newcolonPolyp.
sorry for not finding some examples on how to use vtkExtractCell. Would u
please give me some hints? I am wondering there should be some problems when
I use vtkExtractCell class.
Thanks a lot.
____________________________________________________________
vtkIdList *ptrIds = vtkIdList::New();
for (i=0; i<cellNum; i++)
{
ptrIds->InsertNextId(Pts[i]);
}
vtkExtractCells *newcolonPolyp =vtkExtractCells::New();
newcolonPolyp->SetInput(colonPolyp);
newcolonPolyp->SetCellList(ptrIds);
// Link New Color Coding Scheme
vtkPolyDataMapper *map = vtkPolyDataMapper::New();
newcolonPolyp->Update();
//map->SetInput(colonPolyp);
map->SetInput((vtkPolyData*)newcolonPolyp->GetOutput());
________________________________________________________________
Best Wishes,
-----------------------------------------------------------------
Dongqing Chen
Ph.D Research Assistant
Rm. 07, Paul C. Lutz Hall
Computer Vision & Image Processing (CVIP) Lab
Department of Electrical & Computer Engineering
Speed School of Engineering
University of Louisville
Louisville, KY. 40292
U.S.A
Email: dqchen at cvip.louisville.edu
Phone:+1-502-852-2789 (Lab)
+1-502-852-6130 (Office)
-----------------------------------------------------------------
----- Original Message -----
From: "Goodwin Lawlor" <goodwin.lawlor at ucd.ie>
To: <vtkusers at public.kitware.com>
Sent: Tuesday, September 26, 2006 1:30 PM
Subject: [vtkusers] Re: PolyData Points Delete.
> Hi,
>
> Have a look at this class already included in VTK:
> http://www.vtk.org/doc/nightly/html/classvtkExtractCells.html
>
> hth
>
> Goodwin
>
> _______________________________________________
> This is the private VTK discussion list. Please keep messages on-topic.
> Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list