View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
0005357 | ITK | public | 2007-07-17 17:27 | 2010-10-21 11:12 | |||||||||
Reporter | Dan Homerick | ||||||||||||
Assigned To | Luis Ibanez | ||||||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||||||
Status | assigned | Resolution | open | ||||||||||
Platform | OS | OS Version | |||||||||||
Product Version | ITK-4-A3 | ||||||||||||
Target Version | Fixed in Version | ||||||||||||
Summary | 0005357: PolygonSpatialObject cannot calculate area with 2D image | ||||||||||||
Description | The Area() method depends on the Plane() method. Plane() is hard-coded for 3-D and doesn't work in 2-D (since min[2] != max[2], at least with gcc v4.1.2). Best solution is to rewrite Plane to handle cases other than 3D properly. Quick solution is to add the special case: if (TDimension == 2) return Coronal; | ||||||||||||
Tags | No tags attached. | ||||||||||||
Resolution Date | |||||||||||||
Sprint | |||||||||||||
Sprint Status | backlog | ||||||||||||
Attached Files | |||||||||||||
Relationships | |
Relationships |
Notes | |
(0010276) Luis Ibanez (manager) 2008-01-23 17:08 |
will fix code and add test. |
(0018120) mseise (reporter) 2009-10-20 02:23 |
The same problem occurs when using the IsInside() method for a 2dimensional Polygon (PolygonSpatialObject< 2 >). That method is used, for example, in SpatialObjectToImageFilter. |
(0021527) pingkunyan (reporter) 2010-07-28 15:55 |
The bug still exists when calculating the area of a 2D polygon. In line 32-35 of "itkPolygonSpatialObject.txx", it is hard coded that if (Self::ObjectDimension == 2) { return Axial; } However, when calculating area, in line 156-157 case Axial: X = 0; Y = 2; For 2D case, this will never get the right Y location and thus give invalid area size. A quick fix is to take mseise's suggestion: if (Self::ObjectDimension == 2) { return Coronal; } |
(0022565) Hans Johnson (developer) 2010-10-21 11:11 |
To be fixed in ITKv4 |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2008-01-23 17:07 | Luis Ibanez | Assigned To | Lydia Ng => Luis Ibanez |
2008-01-23 17:08 | Luis Ibanez | Note Added: 0010276 | |
2008-01-23 17:08 | Luis Ibanez | Status | assigned => acknowledged |
2008-04-29 11:01 | Luis Ibanez | Status | acknowledged => assigned |
2008-04-29 11:01 | Luis Ibanez | Assigned To | Luis Ibanez => Brad Davis |
2009-10-20 02:23 | mseise | Note Added: 0018120 | |
2010-07-28 15:55 | pingkunyan | Note Added: 0021527 | |
2010-10-21 11:09 | Hans Johnson | Assigned To | Brad Davis => Luis Ibanez |
2010-10-21 11:11 | Hans Johnson | Note Added: 0022565 | |
2010-10-21 11:12 | Hans Johnson | Sprint Status | => backlog |
2010-10-21 11:12 | Hans Johnson | Product Version | => ITK-4-A3 |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |