source/dcm_transform.py
def modify_time(origdate, origtime, deltasecs):
    """Takes a dicom time stamp in str format, and a delta and then adds the delta
       to riginal time and returns that modified time
       returns a datetime result
    """
    try:
        torig = datetime.strptime(origdate + ' ' + origtime, "%Y%m%d %H%M%S.%f")
        dmicrosec = int((float(deltasecs) - int(float(deltasecs))) * 1000000)
        tdelta = timedelta(seconds=int(float(deltasecs)), microseconds=dmicrosec)

        tresult = torig + tdelta

        return tresult

    except Exception:
        print("modify_time: could not modify timestamp error during conversion ...")
Takes a dicom time stamp in str format, and a delta and then adds the delta
       to riginal time and returns that modified time
       returns a datetime result
    
Takes a dicom time stamp in str format, and a delta and then adds the delta
to riginal time and returns that modified time
returns a datetime result
Takes a dicom time stamp in str format and a delta and then adds the delta to riginal time and returns that modified time returns a datetime result
def modify_time(origdate, origtime, deltasecs):
    try:
        torig = datetime.strptime(origdate + ' ' + origtime, "%Y%m%d %H%M%S.%f")
        dmicrosec = int((float(deltasecs) - int(float(deltasecs))) * 1000000)
        tdelta = timedelta(seconds=int(float(deltasecs)), microseconds=dmicrosec)
        tresult = torig + tdelta
        return tresult
    except Exception:
        print("modify_time: could not modify timestamp error during conversion ...")
def modify_time ( origdate , origtime , deltasecs ) : try : torig = datetime . strptime ( origdate + ' ' + origtime , "%Y%m%d %H%M%S.%f" ) dmicrosec = int ( ( float ( deltasecs ) - int ( float ( deltasecs ) ) ) * 1000000 ) tdelta = timedelta ( seconds = int ( float ( deltasecs ) ) , microseconds = dmicrosec ) tresult = torig + tdelta return tresult except Exception : print ( "modify_time: could not modify timestamp error during conversion ..." )
Takes a dicom time stamp in str format, and a delta and then adds the delta
to riginal time and returns that modified time
returns a datetime result
Takes a dicom time stamp in str format and a delta and then adds the delta to riginal time and returns that modified time returns a datetime result
"""Takes a dicom time stamp in str format, and a delta and then adds the delta
       to riginal time and returns that modified time
       returns a datetime result
    """
origdate
origtime
deltasecs