[vtkusers] problem with GetNumberOfPoints () and GetNumberOfCells ()
Will Schroeder
will.schroeder at kitware.com
Thu Feb 21 20:21:17 EST 2002
Hi Marco-
You've got to make sure the pipeline Updates() before asking for the number
of points and/or cells. Just connecting filters together doesn't make it
update. An Update() occurs automatically when you render; or if you are not
rendering, you can manually invoke Update() on the end of the pipeline.
Also, turn DebugOn() on one or more filters to track its execution.
Also,
>// type PolyData
> vtkPolyData *polydatatemp = vtkPolyData::New();
> polydatatemp = skinDecimate->GetOutput() ;
is a memory leak. GetOutput() returns its output, which overwrites the
pointer to the data you just created. Do instead:
skinDecimate->DebugOn();
skinDecimate->Update();
vtkPolyData *polydatatemp = skinDecimate->GetOutput();
then ask for numbers of points and cells.
Will
At 12:43 AM 2/22/2002 +0100, Marco Kassner wrote:
>Hello.
>
>This is my first mail to the group.
>I develop a program which reads voxel data and calculates Spinmaps.
>Representing the data works easily but I have a problem to access the
>PolyData.
>I receive the result null for the function GetNumberOfPoints () and
>GetNumberOfCells ().
William J. Schroeder, Ph.D
Kitware, Inc.
469 Clifton Corporate Parkway
Clifton Park, NY 12065
will.schroeder at kitware.com
1-518-371-3971 x102
1-518-371-3971 (fax)
More information about the vtkusers
mailing list