[vtkusers] Re: vtkusers digest, Vol 1 #2257 - 4 msgs

Goodwin Lawlor goodwin.lawlor at ucd.ie
Mon Dec 15 08:08:04 EST 2003


Hi,

I have an updated version vtkRemoveCellsFilter where you can "mark" cells
and then delete all the marked cells all at once...

I´ll put in up on a website and mail you,

Goodwin

> Message: 4
> Subject: Re: [vtkusers] Re: vtkRemoveCellsFilter use ?
> From: Liao Qinghu <qing-hu.liao at polymtl.ca>
> Reply-To: qing-hu.liao at polymtl.ca
> To: vtk users <vtkusers at public.kitware.com>
> Organization: Polytechnique
> Date: Sun, 14 Dec 2003 02:03:53 -0500
>
> the vtkRemoveCelssFilter class now can just delete one cell,  could you
> modify it to delete several cells at one time?
>
>
>
> On Wed, 2003-08-06 at 07:55, Mathieu Malaterre wrote:
> > Goowin,
> >
> > One last remark, your filter deal well with triangle strips. Could you
> > please add in the doc to run vtkTriangleFilter first.
> >
> > Thanks
> > mathieu
> >
> > Goodwin Lawlor wrote:
> > > Hi Mathieu,
> > > The problem is the class was intend to be used with a graphics
pipeline and
> > > a vtkCellPicker which updates the filter at least once before you get
a
> > > chance to call RemoveCell (I should have put a check in the code). So
if you
> > > try:
> > >
> > > from vtk import *
> > >
> > > reader = vtkSphereSource()
> > >  reader.Update()
> > >
> > >  #The following two lines doesn't make any differences:
> > >  #reader.GetOutput().BuildLinks(0) #default val is not wrap
> > >  #reader.GetOutput().BuildCells()
> > >
> > >  #print reader.GetOutput().GetNumberOfCells() #96
> > >  #reader.GetOutput().DeleteCell( 10 ) #ok
> > >
> > >  remove = vtkRemoveCellsFilter()
> > >  remove.SetInput( reader.GetOutput() )
> > >  remove.Update()
> > >  remove.RemoveCell( 10 )
> > >
> > > print remove.GetOutput().GetNumberOfCells()
> > >
> > >
> > > HTH
> > >
> > > Goodwin
> > >
> > > ps I'll update the class do you don't have to explicitly update it
before
> > > calling RemoveCell
> > >
> > > ----- Original Message -----
> > > From: "Mathieu Malaterre" <Mathieu.Malaterre at creatis.insa-lyon.fr>
> > > To: <goodwin.lawlor at ucd.ie>
> > > Cc: "VTK-User" <vtkusers at vtk.org>
> > > Sent: Wednesday, July 30, 2003 3:41 PM
> > > Subject: vtkRemoveCellsFilter use ?
> > >
> > >
> > >
> > >>Hi all,
> > >>
> > >>I have tried the vtkRemoveCellsFilter class, but I failed to make it
> > >>work. I am getting a seg fault.
> > >>Could someone told how to use it, or why this simple script fails:
> > >>
> > >>##############################
> > >>from vtk import *
> > >>
> > >>reader = vtkSphereSource()
> > >>reader.Update()
> > >>
> > >>#The following two lines doesn't make any differences:
> > >>#reader.GetOutput().BuildLinks(0) #default val is not wrap
> > >>#reader.GetOutput().BuildCells()
> > >>
> > >>#print reader.GetOutput().GetNumberOfCells() #96
> > >>#reader.GetOutput().DeleteCell( 10 ) #ok
> > >>
> > >>remove = vtkRemoveCellsFilter()
> > >>remove.SetInput( reader.GetOutput() )
> > >>remove.RemoveCell( 10 )
> > >>##############################
> > >>
> > >>Thanks
> > >>mathieu
> > >>
> > >>Problem is coming from:
> > >>
> > >>void RemoveCell(vtkIdType cellid) {
> > >>this->CellIdList->DeleteId(this->CellIdList->GetId(cellid));
> > >>                   ^^^^^^^^
> > >>this->Modified();
> > >>}
> > >>
> > >>DeleteId is call on element number 10...therefore I am getting a seg
fault
> > >>
> > >>REF:
> > >>http://www.bioengineering-research.com/vtk/vtkRemoveCellsFilter.htm
> > >>
> > >>
> > >
> > > _______________________________________________
> > > This is the private VTK discussion list.
> > > Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
> > > Follow this link to subscribe/unsubscribe:
> > > http://www.vtk.org/mailman/listinfo/vtkusers
> > >
> --
> Qinghu Liao
> Department of Computer Engineering,
> Polytechnique, University of Montreal
> CANADA
>
> qing-hu.liao at polymtl.ca
> qhliaok at hotmail.com
>
>
>
>
> --__--__--
>
> _______________________________________________
> vtkusers mailing list
> vtkusers at vtk.org
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
> End of vtkusers Digest
>




More information about the vtkusers mailing list