Hi to all!<br>I would like to ask for a big problem I have.<br>I'm loading a vtkStructuredGrid from a vtk file in these format: <br><br>----<br><br># vtk DataFile Version 3.0<br>vtk output<br>ASCII<br>DATASET STRUCTURED_GRID<br>
DIMENSIONS 249 195 1<br>POINTS 48555 double<br>3.824635e+005 6.534164e+006 0<br>....<br>CELL_DATA 48112<br>SCALARS pressureVar double<br>LOOKUP_TABLE default<br>0 1 2 3 ..... 48111<br>SCALARS elevationVar double<br>
LOOKUP_TABLE default<br>
0 1 2 3 ..... 48111<br>
<br>------<br clear="all"><br>I created a pipeline in Paraview, and everything worked<br><br>vtkStructuredGrid<br>CellDataToPointData<br>Threshold (ON pressureVar points)<br>WarpScalar (ON elevationVar points)<br>Elevation<br>
<br>and displaying pressureVar values. <br><br>I would like to know how to select elevationVar to get WarpScalar filter, <br>then select pressureVar to color mapping the rendering. <br><br>I searched on the Net, looking for how SetInputArrayToProcess works, <br>
but it doesn't works on my code. <br><br><br>I look forward for any reply, AS SOON AS POSSIBLE!!!!<br><br>Kind Regards, <br>Francesco.<br><br>------------------------------<div id=":1ei" class="ii gt">----<br>vtkStructuredGridReader* sgridreader = vtkStructuredGridReader::New(); <br>
sgridreader->SetFileName(VtkFile); <br> sgridreader->Update(); <br><br> //CellDataToPointData already defined<br><br> CellToPoint->SetInputConnection(0,sgridreader->GetOutputPort(0)); <br><br> vtkThreshold* Threshold = vtkThreshold::New(); <br>
Threshold ->SetInputConnection(0,RadarSgrid->GetOutputPort(0)); <br><b> </b>Threshold <b>->SetSelectedComponent(0);</b> (I would like to find a method like this)<br> Threshold ->ThresholdBetween(0,1.1);<br>
Threshold ->Update();<br> <br> double pressureValues[2]; <br> Threshold->GetScalarRange(pressureValues); <br><br> ////warp polygons based on elevation<br> Warp->SetInputConnection(0,Threshold>GetOutputPort(0));<br>
Warp->SetInputArrayToProcess(1,0,0,vtkDataObject::FIELD_ASSOCIATION_POINTS, "elevationVar"); <br> <br>//HERE IT DOESN'T WORKS, IT DOESN'T MAKE WARP by ELEVATION VALUES! <br> Warp->SetNormal(0.0, 0.0, 1.0);<br>
Warp->UseNormalOn();<br> Warp->SetScaleFactor(1.05);</div>