[vtk-developers] vtkClipPolyData

Jerald Zhao jeraldzh at gmail.com
Mon Dec 21 09:17:02 EST 2009


Hi everyone,

I'm a new to VTK.



http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/Graphics/Testing/Tcl/capCow.tcl?root=VTK&content-type=text/plain
 Is it possible to apply above code to vtkstructuredpointsreader class.

###
# Read the polygonal data and generate vertex normals
vtkBYUReader cow
  cow SetGeometryFileName "$VTK_DATA_ROOT/Data/Viewpoint/cow.g"
vtkPolyDataNormals cowNormals
  cowNormals SetInputConnection [cow GetOutputPort]
###

In my sight, these codes should be changed to below

 ###
# Read the polygonal data and generate vertex normals
vtkStructuredPointsReader cow
  cow SetFileName "g";
vtkPolyDataNormals cowNormals
  cowNormals SetInputConnection [cow GetOutputPort]
###

However, the result were below
###
ERROR: In C:\vtk\src\Filtering\vtkDemandDrivenPipeline.cxx, line 828
vtkStreamingDemandDrivenPipeline (0x087C5730): Input for connection index 0
on input port index 0 for algorithm vtkPolyDataNormals(0x087C58A8) is of
type vtkStructuredPoints, but a vtkPolyData is required.
ERROR: In C:\vtk\src\Filtering\vtkDemandDrivenPipeline.cxx, line 828
vtkStreamingDemandDrivenPipeline (0x087C5730): Input for connection index 0
on input port index 0 for algorithm vtkPolyDataNormals(0x087C58A8) is of
type vtkStructuredPoints, but a vtkPolyData is required.
ERROR: In C:\vtk\src\Filtering\vtkDemandDrivenPipeline.cxx, line 828
vtkStreamingDemandDrivenPipeline (0x087C5730): Input for connection index 0
on input port index 0 for algorithm vtkPolyDataNormals(0x087C58A8) is of
type vtkStructuredPoints, but a vtkPolyData is required.
ERROR: In C:\vtk\src\Filtering\vtkDemandDrivenPipeline.cxx, line 828
vtkStreamingDemandDrivenPipeline (0x087C5730): Input for connection index 0
on input port index 0 for algorithm vtkPolyDataNormals(0x087C58A8) is of
type vtkStructuredPoints, but a vtkPolyData is required.
###

where did I make a mistake?


Regards,
Jerald
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtk-developers/attachments/20091221/838a3a0e/attachment.htm>


More information about the vtk-developers mailing list