[vtkusers] 3D Visualization of Map Data
Ron Chapman
Ron.Chapman at rwdi.com
Tue Feb 14 23:28:16 EST 2006
Malcolm,
I'm having problems trying to implement your suggestion.
>>One approach would be to run an elevation filter on your 3D map (to
create scalar values) and then a >>transform with scale set to
1.0,1.0,0.0 which will set all your z values to 0.0. Then probe this
dataset >>with your overlay features (which are at elevation 0.0) and
run the output through vtkWarpScalars (to >>apply the sampled elevations
to your overlay). The only problem is that sampling will only take place
at >>points defined in your overlay dataset and the result may not look
good due to non-sampled >>intersections with your 3D map. Adding some
extra elevation to your overlay may fix this.
I do understand that reconfiguring my 2D shape file to have points
located on the edges of my 3d mesh is the best approach, and will
attempt this once I get the above working first.
Here is my pipeline
....
// run the elevation filter to get the elevation scalars
vtkElevationFilter *Elevation = vtkElevationFilter::New();
Elevation->SetInput(Mesh3D);
// convert our 3d mesh to 2d
vtkTransform *Transform = vtkTransform::New();
Transform->Scale(1.0,1.0,0.0);
vtkTransformPolyDataFilter *transFilter =
vtkTransformPolyDataFilter::New();
transFilter->SetInput(Mesh);
transFilter->SetTransform(Transform);
// probe 2d mesh with shape data
vtkProbeFilter *Probe = vtkProbeFilter::New();
Probe->SetInput(Shape2D);
Probe->SetSource(trasnFilter->GetOutput());
// apply the sampled elevation to the overlay
vtkWarpScalar *Warp = vtkWarpScalar::New();
Warp->SetInput(Probe->GetPolyDataOutput());
Warp->XYPlaneOn();
....
I'm confused as to how the elevation filter and warpscalars are working
together to get my 2D shape file into 3D? The above pipeline is giving
me garbage.
Ron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060214/15548f0e/attachment.htm>
More information about the vtkusers
mailing list