| View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0009398 | ITK | public | 2009-08-11 18:27 | 2009-08-11 19:55 | |||||
| Reporter | Hans Johnson | ||||||||
| Assigned To | Hans Johnson | ||||||||
| Priority | urgent | Severity | major | Reproducibility | always | ||||
| Status | closed | Resolution | fixed | ||||||
| Platform | OS | OS Version | |||||||
| Product Version | |||||||||
| Target Version | Fixed in Version | ITK-3-14 | |||||||
| Summary | 0009398: Changes to itkOptImageToImageMetric.txx on 2009-07-28 break backwards compatibility | ||||||||
| Description | A new boolean variable was introduced to the code on 2009-07-28 in the class called: m_UseFixedImageMask This variable is used to determine if fixed image mask processing should be done. In the past (and in the non-optimized version), fixed image mask processing was contingent only upon the existence of a mask object. This new version of the code now requires that you first set the mask, and then indicate that you want to use the mask. It is also possible to set the m_FixedImageMask to some real mask object, then set m_UseFixedImageMask to true, and subsequently set m_FixedImageMask back to NULL. This scenerio would cause the following bit of code to fail. if( m_UseFixedImageMask ) { double val; if( m_FixedImageMask->ValueAt( inputPoint, val ) ) { | ||||||||
| Additional Information | ======================= I recommend removing the new boolean m_UseFixedImageMask and replacing it with a test of the the existance of a non-null m_FixedImageMask. cvs diff: Diffing Code/Review Index: Code/Review/itkOptImageToImageMetric.h =================================================================== RCS file: /cvsroot/Insight/Insight/Code/Review/itkOptImageToImageMetric.h,v retrieving revision 1.28 diff -r1.28 itkOptImageToImageMetric.h 207,209d206 < void SetUseFixedImageMask( bool useMask ); < itkGetConstReferenceMacro( UseFixedImageMask, bool ); < 397d393 < bool m_UseFixedImageMask; Index: Code/Review/itkOptImageToImageMetric.txx =================================================================== RCS file: /cvsroot/Insight/Insight/Code/Review/itkOptImageToImageMetric.txx,v retrieving revision 1.34 diff -r1.34 itkOptImageToImageMetric.txx 55d54 < m_UseFixedImageMask = false; 174,192d172 < ::SetUseFixedImageMask( bool useMask ) < { < if( useMask != m_UseFixedImageMask ) < { < m_UseFixedImageMask = useMask; < if( m_UseFixedImageMask ) < { < this->SetUseAllPixels( false ); < } < else < { < this->Modified(); < } < } < } < < template <class TFixedImage, class TMovingImage> < void < ImageToImageMetric<TFixedImage,TMovingImage> 608c588 < if( m_UseFixedImageMask --- > if( m_FixedImageMask.IsNotNull() 646c626 < if( m_UseFixedImageMask ) --- > if( m_FixedImageMask.IsNotNull() ) 727c707 < if( m_UseFixedImageMask --- > if( m_FixedImageMask.IsNotNull() 741c721 < if( m_UseFixedImageMask ) --- > if( m_FixedImageMask.IsNotNull() ) 1596,1603d1575 < if( m_UseFixedImageMask ) < { < os << indent << "Use Fixed Image Mask: True" << std::endl; < } < else < { < os << indent << "Use Fixed Image Mask: False" << std::endl; < } cvs diff: Diffing Code/Review/Statistics ============ Tests are currently running on this. | ||||||||
| Tags | No tags attached. | ||||||||
| Resolution Date | |||||||||
| Sprint | |||||||||
| Sprint Status | |||||||||
| Attached Files | |||||||||
| Relationships | |
| Relationships |
| Notes | |
|
(0017099) Hans Johnson (developer) 2009-08-11 19:54 |
Thanks for the catch. Please go ahead and fix it. I hope the rest of my changes didn't impact you. Thanks, Stephen |
| Notes |
| Issue History | |||
| Date Modified | Username | Field | Change |
| 2009-08-11 18:27 | Hans Johnson | New Issue | |
| 2009-08-11 19:54 | Hans Johnson | Note Added: 0017099 | |
| 2009-08-11 19:55 | Hans Johnson | Status | new => resolved |
| 2009-08-11 19:55 | Hans Johnson | Fixed in Version | => ITK-3-14 |
| 2009-08-11 19:55 | Hans Johnson | Resolution | open => fixed |
| 2009-08-11 19:55 | Hans Johnson | Assigned To | => Hans Johnson |
| 2009-08-11 19:55 | Hans Johnson | Status | resolved => closed |
| Issue History |
| Copyright © 2000 - 2018 MantisBT Team |