[Gdcm2] gdcm.IPPSorter doesn't like unicode
Cross-platform DICOM implementation
Brought to you by:
malat
|
From: Charl B. <c.p...@tu...> - 2008-04-29 16:48:46
|
Hi there Mathieu,
Me again! :)
print l
[u'C:\\TEMP\\dicomtest\\im00010.dcm', u'C:\\TEMP\\dicomtest\\im00000.dcm']
print l2
['C:\\TEMP\\dicomtest\\im00010.dcm', 'C:\\TEMP\\dicomtest\\im00000.dcm']
sorter = gdcm.IPPSorter()
sorter.Sort(l2)
True
sorter.Sort(l)
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "C:\build\jwd\build\gdcm-build\bin\gdcm.py", line 2425, in Sort
def Sort(*args): return _gdcm.IPPSorter_Sort(*args)
TypeError: in method 'IPPSorter_Sort', argument 2 of type
'std::vector< std::string,std::allocator< std::string > > const &'
The only difference between l and l2 is that l contains unicode
versions of the strings in l2. I've seen this with more methods in
GDCM: normal strings okay, unicode isn't. Should I just cast
everything, or is there another solution?
Thanks for all your time,
Charl
|