source/dcm_transform.py
def transform_dates(file_count, dataset, args):
    """Transform acquisition date or time, or series date or time"""
    change_tag_if_arg(dataset, "SeriesDate", args.date)
    change_tag_if_arg(dataset, "SeriesTime", args.time)
    change_tag_if_arg(dataset, "StudyDate", args.sdate)
    change_tag_if_arg(dataset, "StudyTime", args.stime)
    change_tag_if_arg(dataset, "ContentDate", args.cdate)
    change_tag_if_arg(dataset, "ContentTime", args.ctime)
    change_tag_if_arg(dataset, "AcquisitionDate", args.adate)
    change_tag_if_arg(dataset, "AcquisitionTime", args.atime)

    try:
        if args.adelta != '':
            secs_offset = str(float(args.adelta) * file_count)
            current_time = modify_time(dataset.AcquisitionDate, dataset.AcquisitionTime, secs_offset)
            dataset.AcquisitionDate = get_dicom_date_from(current_time)
            dataset.AcquisitionTime = get_dicom_time_from(current_time)
    except Exception as exc:
        print(exc)
Transform acquisition date or time, or series date or time
Transform acquisition date or time, or series date or time
Transform acquisition date or time or series date or time
def transform_dates(file_count, dataset, args):
    change_tag_if_arg(dataset, "SeriesDate", args.date)
    change_tag_if_arg(dataset, "SeriesTime", args.time)
    change_tag_if_arg(dataset, "StudyDate", args.sdate)
    change_tag_if_arg(dataset, "StudyTime", args.stime)
    change_tag_if_arg(dataset, "ContentDate", args.cdate)
    change_tag_if_arg(dataset, "ContentTime", args.ctime)
    change_tag_if_arg(dataset, "AcquisitionDate", args.adate)
    change_tag_if_arg(dataset, "AcquisitionTime", args.atime)
    try:
        if args.adelta != '':
            secs_offset = str(float(args.adelta) * file_count)
            current_time = modify_time(dataset.AcquisitionDate, dataset.AcquisitionTime, secs_offset)
            dataset.AcquisitionDate = get_dicom_date_from(current_time)
            dataset.AcquisitionTime = get_dicom_time_from(current_time)
    except Exception as exc:
        print(exc)
def transform_dates ( file_count , dataset , args ) : change_tag_if_arg ( dataset , "SeriesDate" , args . date ) change_tag_if_arg ( dataset , "SeriesTime" , args . time ) change_tag_if_arg ( dataset , "StudyDate" , args . sdate ) change_tag_if_arg ( dataset , "StudyTime" , args . stime ) change_tag_if_arg ( dataset , "ContentDate" , args . cdate ) change_tag_if_arg ( dataset , "ContentTime" , args . ctime ) change_tag_if_arg ( dataset , "AcquisitionDate" , args . adate ) change_tag_if_arg ( dataset , "AcquisitionTime" , args . atime ) try : if args . adelta != '' : secs_offset = str ( float ( args . adelta ) * file_count ) current_time = modify_time ( dataset . AcquisitionDate , dataset . AcquisitionTime , secs_offset ) dataset . AcquisitionDate = get_dicom_date_from ( current_time ) dataset . AcquisitionTime = get_dicom_time_from ( current_time ) except Exception as exc : print ( exc )
Transform acquisition date or time, or series date or time
Transform acquisition date or time or series date or time
"""Transform acquisition date or time, or series date or time"""
file_count
dataset
args