DCMTK
Version 3.6.5
OFFIS DICOM Toolkit
|
A class that implements the different kinds attribute matching. More...
Classes | |
struct | Range |
Helper class for parsing value range pairs, as in date/time ranges. More... | |
Public Member Functions | |
DcmAttributeMatching () | |
Default construct an empty DcmAttributeMatching object. | |
DcmAttributeMatching (const DcmVR vr) | |
Construct an DcmAttributeMatching object that is appropriate for the given VR. More... | |
operator OFBool () const | |
Test whether this object may be used for matching, i.e. whether it is not empty. More... | |
OFBool | operator! () const |
Test whether this object cannot be used for matching, i.e. whether it is empty. More... | |
OFBool | operator() (const void *queryData, const size_t querySize, const void *candidateData, const size_t candidateSize) const |
Match the given query and candidate using the internally stored matching function. More... | |
Static Public Member Functions | |
static OFBool | isDateQuery (const void *queryData, const size_t querySize) |
Check whether the given query data conforms to the VR DA. More... | |
static OFBool | isTimeQuery (const void *queryData, const size_t querySize) |
Check whether the given query data conforms to the VR TM. More... | |
static OFBool | isDateTimeQuery (const void *queryData, const size_t querySize) |
Check whether the given query data conforms to the VR DT. More... | |
static OFBool | singleValueMatching (const void *queryData, const size_t querySize, const void *candidateData, const size_t candidateSize) |
Match the query data and the candidate using Single Value Matching, as defined by the DICOM standard. More... | |
static OFBool | wildCardMatching (const void *queryData, const size_t querySize, const void *candidateData, const size_t candidateSize) |
Match the query and the candidate string using Wild Card Matching, as defined by the DICOM standard. More... | |
static OFBool | rangeMatchingDate (const void *queryData, const size_t querySize, const void *candidateData, const size_t candidateSize) |
Match the query date or date range and the candidate date. More... | |
static OFBool | rangeMatchingTime (const void *queryData, const size_t querySize, const void *candidateData, const size_t candidateSize) |
Match the query time or time range and the candidate time. More... | |
static OFBool | rangeMatchingDateTime (const void *queryData, const size_t querySize, const void *candidateData, const size_t candidateSize) |
Match the query date time or date time range and the candidate date time. More... | |
static OFBool | rangeMatchingDateTime (const void *dateQueryData, const size_t dateQuerySize, const void *timeQueryData, const size_t timeQuerySize, const void *dateCandidateData, const size_t dateCandidateSize, const void *timeCandidateData, const size_t timeCandidateSize) |
Match the query date and time or date and time range and the candidate date and time using combined datetime matching. More... | |
static OFBool | listOfUIDMatching (const void *queryData, const size_t querySize, const void *candidateData, const size_t candidateSize) |
Match the query list of UIDs with the candidate UID. More... | |
Static Private Member Functions | |
static OFBool | checkRangeQuery (OFBool(*check)(const char *, const size_t), const void *queryData, const size_t querySize) |
Helper function for generically implementing check functions operating on ranges. More... | |
template<typename T > | |
static OFBool | rangeMatchingTemplate (OFCondition(*parse)(const char *, const size_t, T &), const Range &query, const T &candidate) |
Helper template function for generically implementing range matching. More... | |
template<typename T > | |
static OFBool | rangeMatchingTemplate (OFCondition(*parse)(const char *, const size_t, T &), const void *queryData, const size_t querySize, const void *candidateData, const size_t candidateSize) |
Helper template function for generically implementing range matching. More... | |
Private Attributes | |
OFBool(* | m_pMatch )(const void *, const size_t, const void *, const size_t) |
A pointer to one of the matching functions that is appropriate for the given VR. | |
A class that implements the different kinds attribute matching.
DcmAttributeMatching may either be used by directly calling the appropriate matching function, e.g. wildCardMatching() or by creating a DcmAttributeMatching object for a specific VR. In the latter case, DcmAttributeMatching will choose the appropriate matching function for the VR in its constructor and remember the result during its lifetime.
DcmAttributeMatching::DcmAttributeMatching | ( | const DcmVR | vr | ) |
Construct an DcmAttributeMatching object that is appropriate for the given VR.
vr | the DICOM Value Representation of the data that this object will be used on for matching. |
|
staticprivate |
Helper function for generically implementing check functions operating on ranges.
check | a pointer to a function that checks a single value of the given query. |
queryData | a pointer to some data. |
querySize | the size (in bytes) of the data queryData refers to. |
|
static |
Check whether the given query data conforms to the VR DA.
queryData | a pointer to some data. |
querySize | the size (in bytes) of the data queryData refers to. |
|
static |
Check whether the given query data conforms to the VR DT.
queryData | a pointer to some data. |
querySize | the size (in bytes) of the data queryData refers to. |
|
static |
Check whether the given query data conforms to the VR TM.
queryData | a pointer to some data. |
querySize | the size (in bytes) of the data queryData refers to. |
|
static |
Match the query list of UIDs with the candidate UID.
queryData | a pointer to a character string that contains a backslash separated list of UIDs. |
querySize | the size (in bytes) of the string queryData refers to. |
candidateData | a pointer to a character string that contains an UID. |
candidateSize | the size (in bytes) of the string candidateData refers to. |
DcmAttributeMatching::operator OFBool | ( | ) | const |
Test whether this object may be used for matching, i.e. whether it is not empty.
OFBool DcmAttributeMatching::operator! | ( | ) | const |
Test whether this object cannot be used for matching, i.e. whether it is empty.
OFBool DcmAttributeMatching::operator() | ( | const void * | queryData, |
const size_t | querySize, | ||
const void * | candidateData, | ||
const size_t | candidateSize | ||
) | const |
Match the given query and candidate using the internally stored matching function.
queryData | a pointer some DICOM data that uses the same VR that was given during construction of this object. |
querySize | the size (in bytes) of the data queryData refers to. |
candidateData | a pointer to some DICOM data that used the same VR that was given during construction of this object. |
candidateSize | the size (in bytes) of the data candidateData refers to. |
|
static |
Match the query date or date range and the candidate date.
queryData | a pointer to a character string that contains a DICOM Date (DA) or a date range. |
querySize | the size (in bytes) of the string queryData refers to. |
candidateData | a pointer to a character string that contains a DICOM Date (DA). |
candidateSize | the size (in bytes) of the string candidateData refers to. |
|
static |
Match the query date and time or date and time range and the candidate date and time using combined datetime matching.
dateQueryData | a pointer to a character string that contains a DICOM Date (DA) or a date range. |
dateQuerySize | the size (in bytes) of the string dateQueryData refers to. |
timeQueryData | a pointer to a character string that contains a DICOM Time (TM) or a time range. |
timeQuerySize | the size (in bytes) of the string timeQueryData refers to. |
dateCandidateData | a pointer to a character string that contains a DICOM Date (DA). |
dateCandidateSize | the size (in bytes) of the string dateCandidateData refers to. |
timeCandidateData | a pointer to a character string that contains a DICOM Time (TM). |
timeCandidateSize | the size (in bytes) of the string timeCandidateData refers to. |
|
static |
Match the query date time or date time range and the candidate date time.
queryData | a pointer to a character string that contains a DICOM Date Time (DT) or a date time range. |
querySize | the size (in bytes) of the string queryData refers to. |
candidateData | a pointer to a character string that contains a DICOM Date Time (DT). |
candidateSize | the size (in bytes) of the string candidateData refers to. |
|
staticprivate |
Helper template function for generically implementing range matching.
T | the type to parse the data int (e.g. OFDate), deduced automatically. |
parse | a pointer to a function that parses a string as a T. |
query | the already separated (but not parsed) query. |
candidate | the already parsed candidate. |
|
staticprivate |
Helper template function for generically implementing range matching.
T | the type to parse the data int (e.g. OFDate), deduced automatically. |
parse | a pointer to a function that parses a string as a T. |
queryData | a pointer to a character string that can be parsed as a T or a dash separated range of two Ts. |
querySize | the size (in bytes) of the string queryData refers to. |
candidateData | a pointer to a character string that can be parsed as a T for comparing it with the query. |
candidateSize | the size (in bytes) of the string candidateData refers to. |
|
static |
Match the query time or time range and the candidate time.
queryData | a pointer to a character string that contains a DICOM Time (TM) or a time range. |
querySize | the size (in bytes) of the string queryData refers to. |
candidateData | a pointer to a character string that contains a DICOM Time (TM). |
candidateSize | the size (in bytes) of the string candidateData refers to. |
|
static |
Match the query data and the candidate using Single Value Matching, as defined by the DICOM standard.
queryData | a pointer to some data. |
querySize | the size (in bytes) of the data queryData refers to. |
candidateData | a pointer to some data. |
candidateSize | the size (in bytes) of the data candidateData refers to. |
|
static |
Match the query and the candidate string using Wild Card Matching, as defined by the DICOM standard.
queryData | a pointer to a character string potentially containing Wild Card characters. |
querySize | the size (in bytes) of the string queryData refers to. |
candidateData | a pointer to a character string. |
candidateSize | the size (in bytes) of the string candidateData refers to. |