DicomTimeTool

MacroModule

genre

DICOM

author

MeVis Medical Solutions AG

package

MeVisLab/Standard

definition

dicommacros.def

keywords

date, calculation, difference

Purpose

The module DicomTimeTool is intended to ease handling of date and time values from DICOM tags, e.g., from the AcquisitionDate and AcquisitionTime tags.

It splits date and time values and calculates differences between date/time values.

Usage

Put DICOM date/time values in the Dicom Date1 and Dicom Date2, resp. Dicom Time1 and Dicom Time2 fields, the other fields are updated automatically.

To get these values from an image, you can use the DicomTagViewer module.

Details

This module should handle any valid DICOM date and time values.

Time differences can only be computed if the date is provided in both fields. Time is optional: You will see an error message in the status field, but for calculation purposes, empty fields will be assumed to contain the time 000000.

Windows

Default Panel

../../../Modules/Macros/Dicom/mhelp/Images/Screenshots/DicomTimeTool._default.png

Parameter Fields

Field Index

Day1: Integer

Hour1: Integer

Second date/time is later than first: Bool

Day2: Integer

Hour2: Integer

Second1: Integer

Days: Double

Micro Second1: Integer

Second2: Integer

Dicom Date1: String

Micro Second2: Integer

Seconds: Double

Dicom Date2: String

Minute1: Integer

Status: String

Dicom Time1: String

Minute2: Integer

Year1: Integer

Dicom Time2: String

Month1: Integer

Year2: Integer

diffHours: Double

Month2: Integer

Years: Double

Visible Fields

Dicom Date1

name: dicomDate1, type: String

Sets the first date in the format YYYYMMDD.

Dicom Time1

name: dicomTime1, type: String

Sets the first time in the format HHMMSS.mmmm, where mmmm represents microseconds.

The field also accepts just HHMMSS.

Dicom Date2

name: dicomDate2, type: String

Sets the second date in the format YYYYMMDD.

Dicom Time2

name: dicomTime2, type: String

Sets the second time in the format HHMMSS.mmmm, where mmmm represents microseconds.

The field also accepts just HHMMSS.

Year1

name: year1, type: Integer, persistent: no

Shows the year of the first entry or 0 if the entry is empty.

Month1

name: month1, type: Integer, persistent: no

Shows the month of the first entry or 0 if the entry is empty.

Day1

name: day1, type: Integer, persistent: no

Shows the day of the first entry or 0 if the entry is empty.

Hour1

name: hour1, type: Integer, persistent: no

Shows the hour of the first entry or 0 if the entry is empty.

Minute1

name: minute1, type: Integer, persistent: no

Shows the minute of the first entry or 0 if the entry is empty.

Second1

name: second1, type: Integer, persistent: no

Shows the seconds of the first entry or 0 if the entry is empty.

Micro Second1

name: microSecond1, type: Integer, persistent: no

Shows the microseconds of the first entry or 0 if the entry is empty or if no microseconds are given.

Year2

name: year2, type: Integer, persistent: no

Shows the year of the second entry or 0 if the entry is empty.

Month2

name: month2, type: Integer, persistent: no

Shows the month of the second entry or 0 if the entry is empty.

Day2

name: day2, type: Integer, persistent: no

Shows the day of the second entry or 0 if the entry is empty.

Hour2

name: hour2, type: Integer, persistent: no

Shows the hour of the second entry or 0 if the entry is empty.

Minute2

name: minute2, type: Integer, persistent: no

Shows the minute of the second entry or 0 if the entry is empty.

Second2

name: second2, type: Integer, persistent: no

Shows the seconds of the second entry or 0 if the entry is empty.

Micro Second2

name: microSecond2, type: Integer, persistent: no

Shows the microseconds of the second entry or 0 if the entry is empty or if no microseconds are given.

Second date/time is later than first

name: secondIsLater, type: Bool, persistent: no

Shows whether the second date/time is later than the first date/time.

Seconds

name: diffSeconds, type: Double, persistent: no

Shows the difference in seconds of the two entries.

Days

name: diffDays, type: Double, persistent: no

Shows the difference in days of the two entries.

Years

name: diffYears, type: Double, persistent: no

Shows the difference in years of the two entries.

Status

name: status, type: String, persistent: no

Shows status information about the module.

Hidden Fields

diffHours

name: diffHours, type: Double, persistent: no