[vtkusers] Select a POINT DATA set from .vtk File, code modified

Francesco Babboni jimmigoo at gmail.com
Thu Jul 30 10:50:29 EDT 2009


in reality, I've written
Threshold->SetInputConnection(0,CellToPoint->GetOutputPort(0));

instead of.
    Threshold ->SetInputConnection(0,RadarSgrid->GetOutputPort(0));


So the code is


vtkStructuredGridReader* sgridreader = vtkStructuredGridReader::New();
    sgridreader->SetFileName(VtkFile);
    sgridreader->Update();

//CellDataToPointData already defined

    CellToPoint->SetInputConnection(0,sgridreader->GetOutputPort(0));

    vtkThreshold* Threshold = vtkThreshold::New();
Threshold->SetInputConnection(0,CellToPoint->GetOutputPort(0));
*    *Threshold *->SetSelectedComponent(0);* (I would like to find a method
like this)
    Threshold ->ThresholdBetween(0,1.1);
    Threshold ->Update();

    double pressureValues[2];
    Threshold->GetScalarRange(pressureValues);

    ////warp polygons based on elevation
    Warp->SetInputConnection(0,Threshold>GetOutputPort(0));

Warp->SetInputArrayToProcess(1,0,0,vtkDataObject::FIELD_ASSOCIATION_POINTS,
"elevationVar");

//HERE IT DOESN'T WORKS, IT DOESN'T MAKE WARP by ELEVATION VALUES!
    Warp->SetNormal(0.0, 0.0, 1.0);
    Warp->UseNormalOn();
    Warp->SetScaleFactor(1.05);


BUT THE PROBLEM STILL REMAIN... :(
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090730/4b8e9929/attachment.htm>


More information about the vtkusers mailing list