# Pkmodeling: How to modify time between acquisitions

**URL:** <https://discourse.slicer.org/t/pkmodeling-how-to-modify-time-between-acquisitions/3082>\
**Category:** Support\
**Tags:** dce\
**Created:** [June 5, 2018, 9:48pm UTC](https://discourse.slicer.org/t/pkmodeling-how-to-modify-time-between-acquisitions/3082 "2018-06-05T21:48:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bmb777](https://avatars.discourse-cdn.com/v4/letter/b/eb8c5e/32.png) [@bmb777](https://discourse.slicer.org/u/bmb777)\
**Post date:** [June 5, 2018, 9:48pm UTC](https://discourse.slicer.org/t/pkmodeling-how-to-modify-time-between-acquisitions/3082/1 "2018-06-05T21:48:17Z")

</div>

I am currently using the DICOM browser to import a image set with 70 time points/acquisitions that are separated by ~19 seconds, however the software appears to be interpreting the acquisitions as being separated by 10 ms (which I believe corresponds to the TR). Once the DICOM data has been loaded the file name says sorted by Imagepositionpatient+Instancenumber which may be the cause of the misreading of the acquisition time frame. I was wondering the best way to manually correct this?

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fedorov/32/14_2.png) [@fedorov](https://discourse.slicer.org/u/fedorov)\
**Post date:** [June 5, 2018, 10:05pm UTC](https://discourse.slicer.org/t/pkmodeling-how-to-modify-time-between-acquisitions/3082/2 "2018-06-05T22:05:46Z")

</div>

@bmb777 there is currently no interface in the GUI for this, but it is easy to do:

1. import and load the DCE series as a multivolume into Slicer using DICOM Browser. To make sure it is loaded as a multivolume, you can toggle “Advanced” view in the DICOM Browser and see something like this after you examine the dataset:

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/6/66cf68dab83a534e0f96120dce62776c981c5abd.png)

1. save the loaded multivolume as a .nhdr file using “Save data” option:  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/c/ac0035fcf4c960a92768cf70979c369cdd38d286.png)

2. open the .nhdr file in a text editor, you will see the following item in the header that contains time stamps for the individual temporal frames:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/7/87f781b66e2cfc0922fae14ec862c09c53e7cb89.png)

1. update those time stamps with the proper temporal resolution (make sure timestamps are in milliseconds, since this is what PkModeling expects!), you can conveniently make that string as follows:

```python
for i in numpy.arange(0,19000*70,19000): print("%d," % i, end='')

```

1. load the updated .nhdr file into Slicer, it should now show the updated temporal resolution.

Let us know if this resolves the problem for you.

Also, if you can suggest a generic strategy how the proper temporal resolution could be populated for this dataset from the content of the existing DICOM attributes, this would be extremely helpful!

---

<div class="post-metadata">

**Author:** ![bmb777](https://avatars.discourse-cdn.com/v4/letter/b/eb8c5e/32.png) [@bmb777](https://discourse.slicer.org/u/bmb777)\
**Post date:** [June 6, 2018, 6:43pm UTC](https://discourse.slicer.org/t/pkmodeling-how-to-modify-time-between-acquisitions/3082/3 "2018-06-06T18:43:54Z")

</div>

This resolves the issue, thanks. As for a strategy to correct this, I emailed the MRI technician to determine if the information needed is present in the DICOM attributes and will update this post when he responds.
