View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0005499 | VTK | (No Category) | public | 2007-08-14 17:03 | 2008-07-26 13:14 | ||||
Reporter | Levap | ||||||||
Assigned To | David Gobbi | ||||||||
Priority | normal | Severity | crash | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0005499: Bug in vtkThinPlateSplineTransform::InternalUpdate() | ||||||||
Description | The following code leads to crash: division by zero! int nSize = 2; vtkPoints* pScr = vtkPoints::New(); pScr->SetNumberOfPoints(nSize); pScr->SetPoint(0, 0.0, 0.0, 0.0); pScr->SetPoint(1, 5.0, 6.0, 0.0); vtkPoints* pTrg = vtkPoints::New(); pTrg->SetNumberOfPoints(nSize); pTrg->SetPoint(0, 0.0, 0.0, 0.0); pTrg->SetPoint(1, 0.0, 0.0, 0.0); vtkThinPlateSplineTransform* pT = vtkThinPlateSplineTransform::New(); pT->Modified(); pT->SetSourceLandmarks(pScr); pT->SetTargetLandmarks(pTrg); pT->Update(); pT->Delete(); | ||||||||
Additional Information | The problem is in vtkThinPlateSplineTransform.cxx line 373: // normalize the two vectors rs = sqrt(rs); ds[0] /= rs; ds[1] /= rs; ds[2] /= rs; rt = sqrt(rt); dt[0] /= rt; dt[1] /= rt; dt[2] /= rt; The value of rs and rt are zero! What is the right strategy in this case? | ||||||||
Tags | No tags attached. | ||||||||
Project | |||||||||
Type | |||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0010428) David Gobbi (developer) 2008-02-07 17:44 |
If there are duplicate landmarks within either the SourceLandmarks or TargetLandmarks, that qualifies as a bad input and a VTK error should be raised. I will add a check for this. |
(0010585) David Gobbi (developer) 2008-02-19 11:03 edited on: 2008-02-19 11:04 |
Fix committed on Friday, February 15 2008. Code will generate an warning when there are two coincident source or target points, and will no longer crash. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2007-08-14 17:03 | Levap | New Issue | |
2008-02-06 09:28 | Jeff Baumes | Status | backlog => tabled |
2008-02-06 09:28 | Jeff Baumes | Assigned To | => David Gobbi |
2008-02-07 17:44 | David Gobbi | Note Added: 0010428 | |
2008-02-19 11:03 | David Gobbi | Note Added: 0010585 | |
2008-02-19 11:04 | David Gobbi | Note Edited: 0010585 | |
2008-07-25 08:55 | David Gobbi | Note Added: 0012819 | |
2008-07-25 08:55 | David Gobbi | Resolution | open => fixed |
2008-07-25 08:56 | David Gobbi | Note Deleted: 0012819 | |
2008-07-26 13:14 | David Gobbi | Status | tabled => closed |
2011-06-16 13:11 | Zack Galbreath | Category | => (No Category) |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |