Is it possible to make a command-line switch to toggle case sensitivity for PatientName matching?
DICOM standard part 4 specifies that the matching is implementation specific.
dcmqrscp/imagectn PatientName Case Sensitivity
Moderator: Moderator Team
I made the following patch to libsrc/dbutils.cxx:
However, you need additional changes to dbutils.cxx::DB_MatchStrings() (change the call to strcmp).
Code: Select all
int
DB_StringUnify (char *pmod, char *pstr)
{
int uni;
if (*pmod == '\0')
return (*pstr == '\0');
#ifdef STRICT_COMPARE
if ( *pmod == *pstr
#else
#define lcase(c) (((c) >= 'A' && (c) <= 'Z') ? ((c) + 'a' - 'A') : (c))
if ( lcase(*pmod) == lcase(*pstr)
#undef lcase
#endif
|| (*pmod == '?' && *pstr != '\0')
)
return (DB_StringUnify (pmod + 1, pstr + 1));
...
As well as in dbfind.cxx::DB_MatchStrings:
Code: Select all
...
if ((strchr (modl, '*') == NULL) && (strchr (modl, '?') == NULL))
#ifdef STRICT_COMPARE
return (strcmp (modl, string) == 0) ;
#else
return (strcmpi (modl, string) == 0) ;
#endif
match = DB_StringUnify (modl, string) ;
...
Who is online
Users browsing this forum: Bing [Bot] and 1 guest