[IGSTK-Users] Found a Bug in igstkDICOMImageReader.txx

Constantine Zakkaroff mnkz at leeds.ac.uk
Fri Nov 12 12:11:36 EST 2010


Hello ALL,

There appears to be a bug in igstkDICOMImageReader.txx.

If there happens to be only one file name in the list then method 
GetITKImage() returns with a call to m_ImageFileReader->GetOutput() in 
line 850. The problem is that at this stage SetFileName(const char * 
_arg) has not been called yet on m_ImageFileReader, so the return value 
is an empty image.

This bug has not showed up so far because in the same class in 
RequestSetDirectory(...) method it is assumed that the directory should 
have at least 2 DICOM files, which is quite an arbitrary assumption. I 
happen to have only one DICOM file in some directory I'm reading in.

Took me some time to hunt down this issue.

Best regards,
Constantine.



More information about the IGSTK-Users mailing list