Documentation ¶
Index ¶
Constants ¶
const ( InvalidYear = -1 InvalidMonth = -1 InvalidDay = -1 )
Variables ¶
This section is empty.
Functions ¶
func Query ¶
func Query(ds *element.DataSet, f *element.Element) (match bool, matchedElem *element.Element, err error)
Query checks if the dataset matches a QR condition "f". If so, it returns the <true, matched element, nil>. If "f" asks for a universal match (i.e., empty query value), and the element for f.Tag doesn't exist, the function returns <true, nil, nil>. If "f" is malformed, the function returns <false, nil, error reason>.
Types ¶
type DateInfo ¶
type DateInfo struct { // Input string. Str string // Results of parsing Str Year int // Year (CE), in range [0,9999]. E.g., 2015 Month int // Month of year, in range [1,12]. Day int // Day of month, in range [1,31]. }
DateInfo is a result of parsing a date string.
func ParseDate ¶
ParseDate parses a date string or date-range string as defined for the VR type "DA". See https://www.medicalconnections.co.uk/kb/Dicom_Query_DateTime_range.
If "s" is for a point in time, startDate will show that point, and endDate will be {Year:-1,Month:-1,Day:-1}. Is "s" is for a range of dates, [startDate, endDate] stores the range (note: both ends are closed, even though the DICOM spec isn't clear about it.).