View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0003610 | ITK | public | 2006-08-15 01:51 | 2010-10-26 15:07 | |||||
Reporter | Christoph Palm | ||||||||
Assigned To | kentwilliams | ||||||||
Priority | high | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | open | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0003610: casting problem (run-time vs. compile-time) | ||||||||
Description | in itkCannyLevelsetFunction.txx: // Only cast if we need to if ( typeid(TImageType) == typeid(TFeatureImageType)) { m_Canny->SetInput(tempFeature); } else { m_Caster->SetInput(tempFeature); m_Canny->SetInput(m_Caster->GetOutput()); } Cannot be compiled with TImageType != TFeatureImageType, because the compiler stops with an error message like "casting not possible" in m_Canny->SetInput(tempFeature); Obviously, at run-time there is no problem because of the if-statement, but at compile-time, the compiler does not know, that this casting problem never will occure. Luis Ibanez proposed the following solution: "We should add a MetaProgramming boolean check here in order to make those lines conditional. That is, we should replace the "if" statement with a Template expression that is equivalent to a boolean check." | ||||||||
Additional Information | Gerrit topic http://review.source.kitware.com/#change,240 [^] implements solution. | ||||||||
Tags | No tags attached. | ||||||||
Resolution Date | |||||||||
Sprint | |||||||||
Sprint Status | backlog | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0022591) Hans Johnson (developer) 2010-10-21 12:17 |
This is still an issue. |
(0022592) Hans Johnson (developer) 2010-10-21 12:19 |
This can be solved at compile time by having a templated class with a boolean argument. See concept checking classes for a model to follow. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2010-10-21 12:17 | Hans Johnson | Assigned To | Lydia Ng => Luis Ibanez |
2010-10-21 12:17 | Hans Johnson | Note Added: 0022591 | |
2010-10-21 12:18 | Hans Johnson | Assigned To | Luis Ibanez => kentwilliams |
2010-10-21 12:19 | Hans Johnson | Note Added: 0022592 | |
2010-10-26 14:24 | kentwilliams | Sprint Status | => backlog |
2010-10-26 14:24 | kentwilliams | Description Updated | |
2010-10-26 14:24 | kentwilliams | Additional Information Updated | |
2010-10-26 15:07 | kentwilliams | Status | assigned => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |