[vtkusers] Re: vtkRemoveCellsFilter use ?
Mathieu Malaterre
Mathieu.Malaterre at creatis.insa-lyon.fr
Thu Jul 31 11:46:30 EDT 2003
Thanks, I understand my mistake now.
mathieu
Goodwin Lawlor wrote:
> There's an updated source for vtkRemoveCellsFilter at
> http://www.bioengineering-research.com/vtk/vtkRemoveCellsFilter.htm
> which allows you to call RemoveCell() without an initial update.
>
> I've also put the tcl test script there too.
>
> Goodwin
> ----- 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
>
--
Mathieu Malaterre
CREATIS
28 Avenue du Doyen LEPINE
B.P. Lyon-Montchat
69394 Lyon Cedex 03
http://www.creatis.insa-lyon.fr/~malaterre/
More information about the vtkusers
mailing list