MantisBT - ITK
View Issue Details
0000916ITKpublic2004-06-07 13:382009-04-07 06:34
Mathieu Malaterre 
Brad Davis 
lowfeaturealways
closedfixed 
 
 
0000916: IOCommon duplicate code from SystemTools
There is duplicated code from SystemTools.cxx in itkIOCommon.[h cxx]
It would be nice if we either mark it as deprecated or use SystemTools calls instead.
No tags attached.
Issue History
2007-09-18 11:05Luis IbanezNote Added: 0009071
2008-04-29 10:21Luis IbanezAssigned ToBrad King => Brad Davis
2008-05-09 14:14Brad DavisNote Added: 0011780
2008-05-26 10:17Brad DavisNote Added: 0012105
2008-05-26 12:02Brad DavisStatusassigned => resolved
2008-05-26 12:02Brad DavisResolutionopen => fixed
2008-05-26 12:02Brad DavisNote Added: 0012108
2009-04-07 06:34Marius StaringStatusresolved => closed

Notes
(0009071)
Luis Ibanez   
2007-09-18 11:05   
This is not a bug, but a nice thing to have to be consistent with the functions in kwsys.

We will address it in WA10.

The internal implementation of the methods will be replaced with calls to kwsys methods.
(0011780)
Brad Davis   
2008-05-09 14:14   
The ITK and kwsys functions return slightly different results. For example, ITK does not return the '.' in the extension but kwsys does. Also, ITK returns a final '/' on a path, but kwsys strips it.

So, we can wrap the kwsys functions with some logic that makes these modifications.

However, it will be best if developers use the kwsys calls directly.

Right now I'm waiting on an apparent bug in kwsys.
(0012105)
Brad Davis   
2008-05-26 10:17   
In order to maintain backwards compatibility, we will keep the current implementations but deprecate them.
(0012108)
Brad Davis   
2008-05-26 12:02   
Deprecated methods and added tests. I decided not to call kwsys methods directly because the rules regarding trailing slashes, dots for extensions, etc. differed and it would be a fragile mess to translate back and forth.


Diffs:
http://www.itk.org/cgi-bin/viewcvs.cgi/Code/Common/itkMacro.h?root=Insight&r1=1.86&r2=1.87 [^]
http://www.itk.org/cgi-bin/viewcvs.cgi/Code/IO/itkIOCommon.cxx?root=Insight&r1=1.25&r2=1.26 [^]
http://www.itk.org/cgi-bin/viewcvs.cgi/Code/IO/itkIOCommon.h?root=Insight&r1=1.25&r2=1.26 [^]
http://www.itk.org/cgi-bin/viewcvs.cgi/Testing/Code/IO/CMakeLists.txt?root=Insight&r1=1.178&r2=1.179 [^]
http://www.itk.org/cgi-bin/viewcvs.cgi/Testing/Code/IO/itkIOCommonTest.cxx?revision=1.1&root=Insight&view=markup [^]
http://www.itk.org/cgi-bin/viewcvs.cgi/Testing/Code/IO/itkIOTests.cxx?root=Insight&r1=1.60&r2=1.61 [^]