Plotting Over Curves: Difference between revisions
m (wip) |
(→How to use: Add the tests names) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
The <b>Plot Edges<b> filter sort and order polylines for graph visualization. The | =Presentation= | ||
The <b>Plot Edges</b> filter sort and order polylines for graph visualization. The filter split and merge any set of polylines to generate a more coherent set of <i>point-ordered smoothed polylines</i>. The points and cells of the output polylines are ordered in order to have an easy to read graph visualization of the point attributes.<br> | |||
*Ordering | |||
If an input polyline has a set of points like <i>1,3,5,7,...29,31,30,28...4,2,0</i>, jumps would occurs in the graph. This is why the filter sorts the points along the lines. | |||
<center> | <center> | ||
{| | {| | ||
|[[Image:ParaView-PlotEdges-RectPolyLine-PointsNotOrdered.png|thumb| | |[[Image:ParaView-PlotEdges-RectPolyLine-PointsNotOrdered.png|thumb|500px|Rectangle shaped polyline with points not ordered]] | ||
|[[Image:ParaView-PlotEdges-RectPolyLine-PointsOrdered.png|thumb| | |[[Image:ParaView-PlotEdges-RectPolyLine-PointsOrdered.png|thumb|500px|Rectangle shaped polyline with points ordered]] | ||
|} | |||
</center> | |||
*Branching | |||
The previous example was trivial, the input polydata was simple polylines with no branching. In some other cases, input polydata contains loops and branches. The <b>Plot Edges</b> filter tries to overcome the problem by merging the <i>best</i> branches together. It infers that a polyline is smooth and regular: no abrupt change in direction and points spacing is homogeneous. For each nodes in the polydata, a score is computed between the node's polylines. The polylines that make the best pair (highest score) are merged together. | |||
<center> | |||
{| | |||
|[[Image:ParaView-PlotEdges-Intersect.png|thumb|500px|Intersection of polylines. The polylines are inferred to be smoothed and regular.]] | |||
|} | |} | ||
</center> | </center> | ||
*Limitations | |||
The branch merging algorithm may not be optimum for all the cases. Sometimes the choice of merging would require more high-level information. | |||
[[Image: | <center> | ||
{| | |||
|[[Image:ParaView-PlotEdges-IntersectProblem1.png|thumb|500px|What should be the result? 1 long polyline or 2 polylines with circle shape?]] | |||
|[[Image:Paraview-PlotEdges-IntersectProblem2.png|thumb|500px|What should be the result? 1 long polyline or 2 polylines with circle shape?]] | |||
|} | |||
</center> | |||
Suggestion: different merging algorithms can be designed, the user could choose what algorithm would process the best his data... | |||
The | =How to use= | ||
The <b>Plot Edge</b> filter can only be connected to 2D lines. The typical workflow would be: | |||
*Apply the <b>Extract Surface</b> filter to the object | |||
*Apply the <b>Slice</b> filter (plane cut) to <b>Extract Surface</b>. | |||
*Apply the <b>Plot Edges</b> filter to <b>Slice</b>. | |||
*In the <b>Plot Edges</b> <b>Display</b> tab, check the <i>Variable</i> check boxes to visualize the point attributes on the graph. | |||
*in the 3D view, to colorize the polylines with the arc length values, turn the <b>Plot Edges</b> visiblity on and set the <i>Color by</i> box to "arc_length". | |||
For convenience, a composite filter <b>Plot Edges by Plane intersect</b> has been created to automatically apply the filters <b>Extract Surface</b>, <b>Slice</b> and <b>Plot Edges</b>.<br> | |||
If you want concrete examples, you can run the tests <b>PlotEdges.xml</b> and <b>PlotEdges2.xml</b> located in <i>Applications/Client/Testing/XML</i>. | |||
The | =Technical details= | ||
[[ | The <b>Plot Edges</b> filter accepts 2 types of inputs: a [http://www.vtk.org/doc/nightly/html/classvtkPolyData.html vtkPolyData] or a [http://www.vtk.org/doc/nightly/html/classvtkMultiBlockDataSet.html vtkMultiBlockDataSet] containing one or more vtkPolyData.<br> | ||
The output generates a [http://www.vtk.org/doc/nightly/html/classvtkMultiBlockDataSet.html vtkMultiBlockDataSet] with a [http://www.vtk.org/doc/nightly/html/classvtkPolyData.html vtkPolyData] leaf for each polyline.<br> | |||
Latest revision as of 12:48, 28 May 2009
Presentation
The Plot Edges filter sort and order polylines for graph visualization. The filter split and merge any set of polylines to generate a more coherent set of point-ordered smoothed polylines. The points and cells of the output polylines are ordered in order to have an easy to read graph visualization of the point attributes.
- Ordering
If an input polyline has a set of points like 1,3,5,7,...29,31,30,28...4,2,0, jumps would occurs in the graph. This is why the filter sorts the points along the lines.
- Branching
The previous example was trivial, the input polydata was simple polylines with no branching. In some other cases, input polydata contains loops and branches. The Plot Edges filter tries to overcome the problem by merging the best branches together. It infers that a polyline is smooth and regular: no abrupt change in direction and points spacing is homogeneous. For each nodes in the polydata, a score is computed between the node's polylines. The polylines that make the best pair (highest score) are merged together.
- Limitations
The branch merging algorithm may not be optimum for all the cases. Sometimes the choice of merging would require more high-level information.
Suggestion: different merging algorithms can be designed, the user could choose what algorithm would process the best his data...
How to use
The Plot Edge filter can only be connected to 2D lines. The typical workflow would be:
- Apply the Extract Surface filter to the object
- Apply the Slice filter (plane cut) to Extract Surface.
- Apply the Plot Edges filter to Slice.
- In the Plot Edges Display tab, check the Variable check boxes to visualize the point attributes on the graph.
- in the 3D view, to colorize the polylines with the arc length values, turn the Plot Edges visiblity on and set the Color by box to "arc_length".
For convenience, a composite filter Plot Edges by Plane intersect has been created to automatically apply the filters Extract Surface, Slice and Plot Edges.
If you want concrete examples, you can run the tests PlotEdges.xml and PlotEdges2.xml located in Applications/Client/Testing/XML.
Technical details
The Plot Edges filter accepts 2 types of inputs: a vtkPolyData or a vtkMultiBlockDataSet containing one or more vtkPolyData.
The output generates a vtkMultiBlockDataSet with a vtkPolyData leaf for each polyline.