# How to register 3D to 4D

**URL:** https://discourse.itk.org/t/how-to-register-3d-to-4d/2957
**Category:** Beginner Questions
**Tags:** registration, simpleitk
**Created:** [April 17, 2020, 1:49am UTC](https://discourse.itk.org/t/how-to-register-3d-to-4d/2957 "2020-04-17T01:49:50Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![mridev](https://discourse.itk.org/letter_avatar_proxy/v4/letter/m/8e7dd6/32.png) [@mridev](https://discourse.itk.org/u/mridev)
#### Post date: [April 17, 2020, 1:49am UTC](https://discourse.itk.org/t/how-to-register-3d-to-4d/2957/1 "2020-04-17T01:49:50Z")

</div>

Hi all,

I have a 4D image X which is a stack of few 3D volumes. Let’s assume that these 3D volumes are already registered. I also have a 3D volume Y with a different contrast and would like to register it to the 4D image. Let’s assume that we need rigid registration. I was able to do it by registering Y to a randomly picked 3D volume from X. But the accuracy is not always great. I was wondering if I could use the information within all 3D volumes of X and somehow simultaneously register Y to all 3D volumes of X. Is there a way to do that? One idea is to minimize the sum of cost functions for Y and each component of X. Does SimpleITK or ITK provide this kind of multi-volume registration?

Thanks!

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [April 17, 2020, 12:02pm UTC](https://discourse.itk.org/t/how-to-register-3d-to-4d/2957/2 "2020-04-17T12:02:35Z")

</div>

I don’t think what you want already exists in ITK. I can’t think of a quick and easy way to implement it.

It is a special case of groupwise registration. One of the Google hits is [UNC’s hammer](https://www.med.unc.edu/bric/ideagroup/free-softwares/hammer/).
