[vtkusers] vtkAppendPolyData problem after appending manually-created vtkPolyData

cel02000 cel02000 at yahoo.com
Thu May 10 18:04:53 EDT 2012


Dear all,

I have two vtkPolyData that I need to append. I have searched online but
could not find any solution to my problem. The problem is after appending
the vtkPolyData the number of points becomes zero and the two datasets are
not appended properly.

Actually, I have created two vtkPolyData manually by inserting the points by
the function InsertPoints and adding an array named Hills having three
components and set the value of the tuples by SetTuple1 inside the three
nested for-loops. The points of the created vtkPolyData are created similar
to the way vtkStructuredGrid data are created.

	vtkSmartPointer<vtkAppendPolyData> appendFilter =
vtkSmartPointer<vtkAppendPolyData>::New();
	appendFilter->AddInput( polyData1 );	
	appendFilter->AddInput( polyData2 );		
	appendFilter->Update();

	polyDataAppended = appendFilter->GetOutput();	

I don't have this problem in appending the vtkPolyData which are obtained
from VTK readers. In addition, when I add only one of the vtkPolyData to
appendFilter, polyDataAppended contains the right information. However,
adding the two gives me problem. Is there any problem with my polyData1 and
polyData2? Please find their information below.

I would appreciate it if someone could help me with this?
Thanks.



*polyData1 is as follows:*
/vtkPolyData (000000000267F460)
  Debug: Off
  Modified Time: 1467
  Reference Count: 1
  Registered Events: (none)
  Source: (none)
  Information: 0000000002612780
  Data Released: False
  Global Release Data: Off
  UpdateTime: 0
  Field Data:
    Debug: Off
    Modified Time: 1450
    Reference Count: 1
    Registered Events: (none)
    Number Of Arrays: 0
    Number Of Components: 0
    Number Of Tuples: 0
  Number Of Points: 210
  Number Of Cells: 0
  Cell Data:
    Debug: Off
    Modified Time: 1453
    Reference Count: 1
    Registered Events: (none)
    Number Of Arrays: 0
    Number Of Components: 0
    Number Of Tuples: 0
    Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 )
    Interpolate Flags: ( 1 1 1 1 1 0 0 1 )
    Pass Through Flags: ( 1 1 1 1 1 1 1 1 )
    Scalars: (none)
    Vectors: (none)
    Normals: (none)
    TCoords: (none)
    Tensors: (none)
    GlobalIds: (none)
    PedigreeIds: (none)
    EdgeFlag: (none)
  *Point Data:
    Debug: Off
    Modified Time: 1462
    Reference Count: 1
    Registered Events: (none)
    Number Of Arrays: 1
    Array 0 name = Hills
    Number Of Components: 3
    Number Of Tuples: 210*
    Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 )
    Interpolate Flags: ( 1 1 1 1 1 0 0 1 )
    Pass Through Flags: ( 1 1 1 1 1 1 1 1 )
    Scalars: (none)
    Vectors: (none)
    Normals: (none)
    TCoords: (none)
    Tensors: (none)
    GlobalIds: (none)
    PedigreeIds: (none)
    EdgeFlag: (none)
  *Bounds:
    Xmin,Xmax: (-1, 1)
    Ymin,Ymax: (-1, 1)
    Zmin,Zmax: (-1, 1)
  Compute Time: 1469
  Number Of Points: 210*
  Point Coordinates: 0000000001DE40E0
  Locator: 0000000000000000
  Number Of Vertices: 0
  Number Of Lines: 0
  Number Of Polygons: 0
  Number Of Triangle Strips: 0
  Number Of Pieces: 1
  Piece: -1
  Ghost Level: 0
/

*polyData2 is as follows:*
/vtkPolyData (0000000002678730)
  Debug: Off
  Modified Time: 1489
  Reference Count: 1
  Registered Events: (none)
  Source: (none)
  Information: 0000000002678AD0
  Data Released: False
  Global Release Data: Off
  UpdateTime: 0
  Field Data:
    Debug: Off
    Modified Time: 1472
    Reference Count: 1
    Registered Events: (none)
    Number Of Arrays: 0
    Number Of Components: 0
    Number Of Tuples: 0
  Number Of Points: 720
  Number Of Cells: 0
  Cell Data:
    Debug: Off
    Modified Time: 1475
    Reference Count: 1
    Registered Events: (none)
    Number Of Arrays: 0
    Number Of Components: 0
    Number Of Tuples: 0
    Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 )
    Interpolate Flags: ( 1 1 1 1 1 0 0 1 )
    Pass Through Flags: ( 1 1 1 1 1 1 1 1 )
    Scalars: (none)
    Vectors: (none)
    Normals: (none)
    TCoords: (none)
    Tensors: (none)
    GlobalIds: (none)
    PedigreeIds: (none)
    EdgeFlag: (none)
  *Point Data:
    Debug: Off
    Modified Time: 1484
    Reference Count: 1
    Registered Events: (none)
    Number Of Arrays: 1
    Array 0 name = Hills
    Number Of Components: 3
    Number Of Tuples: 720*
    Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 )
    Interpolate Flags: ( 1 1 1 1 1 0 0 1 )
    Pass Through Flags: ( 1 1 1 1 1 1 1 1 )
    Scalars: (none)
    Vectors: (none)
    Normals: (none)
    TCoords: (none)
    Tensors: (none)
    GlobalIds: (none)
    PedigreeIds: (none)
    EdgeFlag: (none)
  *Bounds:
    Xmin,Xmax: (-1.5, 1.5)
    Ymin,Ymax: (-1.5, 1.5)
    Zmin,Zmax: (-1.5, 1.5)
  Compute Time: 1491
  Number Of Points: 720*
  Point Coordinates: 0000000001DE2DF0
  Locator: 0000000000000000
  Number Of Vertices: 0
  Number Of Lines: 0
  Number Of Polygons: 0
  Number Of Triangle Strips: 0
  Number Of Pieces: 1
  Piece: -1
  Ghost Level: 0/

*The resulted vtkPolyData, named polyDataAppended, is as follows:*
/vtkPolyData (00000000026AC490)
  Debug: Off
  Modified Time: 1732
  Reference Count: 2
  Registered Events: (none)
  Source: (none)
  Information: 00000000026AC650
  Data Released: False
  Global Release Data: Off
  UpdateTime: 1736
  Release Data: Off
  UpdateExtent: Not Initialized
  Update Number Of Pieces: 1
  Update Piece: 0
  Update Ghost Level: 0
  MaximumNumberOfPieces: -1
  RequestExactExtent: Off
   Field Data:
    Debug: Off
    Modified Time: 1722
    Reference Count: 1
    Registered Events: (none)
    Number Of Arrays: 0
    Number Of Components: 0
    Number Of Tuples: 0
  Number Of Points: 0
  Number Of Cells: 0
  Cell Data:
    Debug: Off
    Modified Time: 1730
    Reference Count: 1
    Registered Events: (none)
    Number Of Arrays: 0
    Number Of Components: 0
    Number Of Tuples: 0
    Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 )
    Interpolate Flags: ( 1 1 1 1 1 0 0 1 )
    Pass Through Flags: ( 1 1 1 1 1 1 1 1 )
    Scalars: (none)
    Vectors: (none)
    Normals: (none)
    TCoords: (none)
    Tensors: (none)
    GlobalIds: (none)
    PedigreeIds: (none)
    EdgeFlag: (none)
  *Point Data:
    Debug: Off
    Modified Time: 1732
    Reference Count: 1
    Registered Events: (none)
    Number Of Arrays: 0
    Number Of Components: 0
    Number Of Tuples: 0*
    Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 )
    Interpolate Flags: ( 1 1 1 1 1 0 0 1 )
    Pass Through Flags: ( 1 1 1 1 1 1 1 1 )
    Scalars: (none)
    Vectors: (none)
    Normals: (none)
    TCoords: (none)
    Tensors: (none)
    GlobalIds: (none)
    PedigreeIds: (none)
    EdgeFlag: (none)
  *Bounds:
    Xmin,Xmax: (1, -1)
    Ymin,Ymax: (1, -1)
    Zmin,Zmax: (1, -1)
  Compute Time: 1748
  Number Of Points: 0*
  Point Coordinates: 0000000000000000
  Locator: 0000000000000000
  Number Of Vertices: 0
  Number Of Lines: 0
  Number Of Polygons: 0
  Number Of Triangle Strips: 0
  Number Of Pieces: 1
  Piece: 0
  Ghost Level: 0/

--
View this message in context: http://vtk.1045678.n5.nabble.com/vtkAppendPolyData-problem-after-appending-manually-created-vtkPolyData-tp5701607.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list