Inheritance diagram for DcmTime:
Public Member Functions | |
DcmTime (const DcmTag &tag, const Uint32 len=0) | |
constructor. | |
DcmTime (const DcmTime &old) | |
copy constructor | |
virtual | ~DcmTime () |
destructor | |
DcmTime & | operator= (const DcmTime &obj) |
assignment operator | |
virtual DcmObject * | clone () const |
clone method | |
virtual DcmEVR | ident () const |
get element type identifier | |
virtual OFCondition | getOFString (OFString &stringValue, const unsigned long pos, OFBool normalize=OFTrue) |
get a copy of a particular string component | |
OFCondition | setCurrentTime (const OFBool seconds=OFTrue, const OFBool fraction=OFFalse) |
set the element value to the current system time. | |
OFCondition | setOFTime (const OFTime &timeValue) |
set the element value to the given time | |
OFCondition | getOFTime (OFTime &timeValue, const unsigned long pos=0, const OFBool supportOldFormat=OFTrue) |
get the current element value in OFTime format. | |
OFCondition | getISOFormattedTime (OFString &formattedTime, const unsigned long pos=0, const OFBool seconds=OFTrue, const OFBool fraction=OFFalse, const OFBool createMissingPart=OFFalse, const OFBool supportOldFormat=OFTrue) |
get the current element value in ISO time format. | |
Static Public Member Functions | |
static OFCondition | getCurrentTime (OFString &dicomTime, const OFBool seconds=OFTrue, const OFBool fraction=OFFalse) |
get the current system time. | |
static OFCondition | getDicomTimeFromOFTime (const OFTime &timeValue, OFString &dicomTime, const OFBool seconds=OFTrue, const OFBool fraction=OFFalse) |
get the specified OFTime value in DICOM format. | |
static OFCondition | getOFTimeFromString (const OFString &dicomTime, OFTime &timeValue, const OFBool supportOldFormat=OFTrue) |
get the specified DICOM time value in OFTime format. | |
static OFCondition | getISOFormattedTimeFromString (const OFString &dicomTime, OFString &formattedTime, const OFBool seconds=OFTrue, const OFBool fraction=OFFalse, const OFBool createMissingPart=OFFalse, const OFBool supportOldFormat=OFTrue) |
get the specified DICOM time value in ISO format. | |
static OFCondition | getTimeZoneFromString (const OFString &dicomTimeZone, double &timeZone) |
get the specified DICOM time zone in number of hours format DICOM standard states that if the "Timezone Offset From UTC" attribute (0008,0201) is present it applies to all TM attributes in the object. |
Definition at line 46 of file dcvrtm.h.
|
constructor. Create new element from given tag and length.
Referenced by clone(). |
|
copy constructor
|
|
clone method
Reimplemented from DcmByteString. Definition at line 78 of file dcvrtm.h. References DcmTime(). |
|
get the current system time. The DICOM TM format supported by this function is "HHMM[SS[.FFFFFF]]" where the brackets enclose optional parts. If the current system time or parts of it are unavailable the corresponding values are set to "0" and an error code is returned.
|
|
get the specified OFTime value in DICOM format. The DICOM TM format supported by this function is "HHMM[SS[.FFFFFF]]" where the brackets enclose optional parts. If the current system time or parts of it are unavailable the corresponding values are set to "0" and an error code is returned.
|
|
get the current element value in ISO time format. The ISO time format supported by this function is "HH:MM[:SS[.FFFFFF]]" where the brackets enclose optional parts. Please note that the element value is expected to be in valid DICOM TM format ("[HH[MM[SS[.FFFFFF]]]]", "[HH[:MM[:SS[.FFFFFF]]]]" is also supported for reasons of backward compatibility). If this function fails the result variable 'formattedTime' is cleared automatically. Please note that if the "Timezone Offset From UTC" attribute (0008,0201) is present, it applies to all TM attributes in the object. However, the time zone is not taken into account for the creation of the ISO formatted time. See also "getTimeZoneFromString()" below.
|
|
get the specified DICOM time value in ISO format. The ISO time format supported by this function is "HH:MM[:SS[.FFFFFF]]" where the brackets enclose optional parts. Please note that the specified value is expected to be in valid DICOM TM format ("[HH[MM[SS[.FFFFFF]]]]", "[HH[:MM[:SS[.FFFFFF]]]]" is also supported for reasons of backward compatibility). If this function fails the result variable 'formattedTime' is cleared automatically.
|
|
get a copy of a particular string component
Reimplemented from DcmByteString. |
|
get the current element value in OFTime format. Please note that the element value is expected to be in valid DICOM TM format ("[HH[MM[SS[.FFFFFF]]]]", "[HH[:MM[:SS[.FFFFFF]]]]" is also supported for reasons of backward compatibility). Since there is no time zone for the DICOM TM format local time is assumed (the time zone of 'timeValue' is set automatically). If this function fails the result variable 'timeValue' is cleared automatically.
|
|
get the specified DICOM time value in OFTime format. Please note that the element value is expected to be in valid DICOM TM format ("[HH[MM[SS[.FFFFFF]]]]", "[HH[:MM[:SS[.FFFFFF]]]]" is also supported for reasons of backward compatibility). Since there is no time zone for the DICOM TM format local time is assumed (the time zone of 'timeValue' is set automatically). If this function fails the result variable 'timeValue' is cleared automatically.
|
|
get the specified DICOM time zone in number of hours format DICOM standard states that if the "Timezone Offset From UTC" attribute (0008,0201) is present it applies to all TM attributes in the object. This functions allows to convert the DICOM format ("&ZZZZ" where "&" is "+" or "-" and "ZZZZ" hours and minutes) to a floating point value, e.g. "+1.0" means plus one hour and "-2.5" minus two and a half hour, i.e. 2 hours and 30 minutes. The resulting 'timeZone' value can be used in conjuction with a OFTime object to convert the time to different time zones (e.g. to local time or UTC).
|
|
get element type identifier
Reimplemented from DcmByteString. |
|
assignment operator
|
|
set the element value to the current system time. The DICOM TM format supported by this function is "HHMM[SS[.FFFFFF]]" where the brackets enclose optional parts. If the current system time or parts of it are unavailable the corresponding values are set to "0" and an error code is returned.
|
|
set the element value to the given time
|