View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0009883 | VTK | (No Category) | public | 2009-11-11 13:44 | 2016-08-12 09:55 | ||||
Reporter | Mathieu Coursolle | ||||||||
Assigned To | Kitware Robot | ||||||||
Priority | normal | Severity | crash | Reproducibility | sometimes | ||||
Status | closed | Resolution | moved | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0009883: vtkXYPlotActor clipping causes crash and/or rendering problems. | ||||||||
Description | When a vtkXYPlotActor is use to display data, it clips the values that are out of the specified range. In the function vtkXYPlotActor::ClipPlotData, it checks all the points are creates new cells for which the points outside the specified range are kept. The ones outside the range are excluded. One case is not handled. In the following code, if there are no trivial rejection, nor trivial acceptance, than we check if x1 is out of range. If so, we assume that x2 is not, which is not always true. In that case, an id of -1 will be set to a cell, which may cause a crash at rendering time. //intersect each segment with the four planes if ( (x1[0] < p1[0] && x2[0] < p1[0]) || (x1[0] > p2[0] && x2[0] > p2[0]) || (x1[1] < p1[1] && x2[1] < p1[1]) || (x1[1] > p2[1] && x2[1] > p2[1]) ) { ;//trivial rejection } else if (x1[0] >= p1[0] && x2[0] >= p1[0] && x1[0] <= p2[0] && x2[0] <= p2[0] && x1[1] >= p1[1] && x2[1] >= p1[1] && x1[1] <= p2[1] && x2[1] <= p2[1] ) {//trivial acceptance newPts[0] = pointMap[pts[i]]; newPts[1] = pointMap[pts[i+1]]; newLines->InsertNextCell(2,newPts); } else { if (x1[0] >= p1[0] && x1[0] <= p2[0] && x1[1] >= p1[1] && x1[1] <= p2[1] ) {//first point in newPts[0] = pointMap[pts[i]]; } else {//second point in newPts[0] = pointMap[pts[i+1]]; } for (j=0; j<4; j++) { this->ClipPlanes->GetPoints()->GetPoint(j, px); this->ClipPlanes->GetNormals()->GetTuple(j, n); if ( vtkPlane::IntersectWithLine(x1,x2,n,px,t,xint) && t >= 0 && t <= 1.0 ) { newPts[1] = newPoints->InsertNextPoint(xint); break; } } newLines->InsertNextCell(2,newPts); } } | ||||||||
Tags | No tags attached. | ||||||||
Project | |||||||||
Type | |||||||||
Attached Files | vtkXYPlotActorPatch.txt [^] (597 bytes) 2009-11-11 13:44 [Show Content] | ||||||||
Relationships | |
Relationships |
Notes | |
(0018393) Mathieu Coursolle (reporter) 2009-11-11 13:45 |
A proposed patch was uploaded on 2009-11-11 (vtkXYPlotActorPatch.txt). |
(0018487) Mathieu Coursolle (reporter) 2009-11-19 15:28 |
Commited vtkXYPlotActor.cxx, revision 1.70 on 2009/11/19. |
(0037119) Kitware Robot (administrator) 2016-08-12 09:55 |
Resolving issue as `moved`. This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2009-11-11 13:44 | Mathieu Coursolle | New Issue | |
2009-11-11 13:44 | Mathieu Coursolle | File Added: vtkXYPlotActorPatch.txt | |
2009-11-11 13:45 | Mathieu Coursolle | Note Added: 0018393 | |
2009-11-19 15:28 | Mathieu Coursolle | Note Added: 0018487 | |
2011-06-16 13:11 | Zack Galbreath | Category | => (No Category) |
2016-08-12 09:55 | Kitware Robot | Note Added: 0037119 | |
2016-08-12 09:55 | Kitware Robot | Status | expired => closed |
2016-08-12 09:55 | Kitware Robot | Resolution | open => moved |
2016-08-12 09:55 | Kitware Robot | Assigned To | => Kitware Robot |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |