[vtkusers] Problem of vtkPolyDataToImageStencil
Yan Pingkun
engp1734 at nus.edu.sg
Mon Mar 22 13:26:14 EST 2004
Hi all,
I'm using vtkPolyDataToImageStencil in my project. I run the TCL text
program. It is OK except the recently reported bug.
But when I wrote program in C++, the filter can't work. My code is as
follows:
========================================================
vtkSphereSource* sphere = vtkSphereSource::New();
sphere->SetPhiResolution(12);
sphere->SetThetaResolution(12);
sphere->SetCenter(48, 48, 48);
sphere->SetRadius(5);
vtkPolyDataToImageStencil* Poly2Stencil =
vtkPolyDataToImageStencil::New();
Poly2Stencil->SetInput(sphere->GetOutput());
Poly2Stencil->Update();
const vtkImageStencilData* stencilData = Poly2Stencil->GetOutput();
========================================================
When I debug the program, I found that the extent of stencilData is
always -1, which causes the program crash.
Anybody can help? I'm working under Windows XP with MSVC 6.
Thanks!
Regards,
Pingkun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040323/343a868c/attachment.htm>
More information about the vtkusers
mailing list