Start to learn VTK. structuredgrid and rectilineargrid in VTK are different!
Rectilineargrid is set as follows:
Vtkrectilineargrid * rgrid = vtkrectilineargrid: New ();
Rgrid-> setdimensions (47,33, 44 );
Rgrid-> setxcoordinates (xcoords );
Rgrid-> setycoordinates (ycoords );
Rgrid-> setzcoordinates (zcoords );
// Extract a plane from the grid to see what we 've got.
Vtkrectilineargridgeometryfilter * plane = vtkrectilineargridgeometryfilter: New ();
Plane-> setinput (rgrid );
Plane-> setextent (, 16, 16 );
Vtkpolydatamapper * rgridmapper = vtkpolydatamapper: New ();
Rgridmapper-> setinputconnection (plane-> getoutputport ());
In rgrid, coordinates are a matrix. The data is set to transmit the X, Y, and zcoordinates to rgid respectively.
The structuredgrid setting method is as follows:
Sgrid-> setpoints (points );
Points-> Delete ();
Sgrid-> getpointdata ()-> setvectors (vectors );
Vectors-> Delete ();
Vtkpolydatamapper * sgridmapper = vtkpolydatamapper: New ();
Sgridmapper-> setinputconnection (Hedgehog-> getoutputport ());
Vtkactor * sgridactor = vtkactor: New ();
Sgridactor-> setmapper (sgridmapper );
Sgrid is different. Although coordinates need to be stored, they are saved one by one.
The difference is like this.
The specific problem is not clear yet.