Unwarp MRI images



I want to unwarp stacks of MRI images. For example, axial slices of a perfect cylindrical object appear smaller at the lower and upper end. (This is due to non-linearities of the MRI imaging gradients at the ends of the field of view). I tried “Register Virtual Stacks”, but it does not work. error message is that feature extraction finds 0 data points.

Thanks for help!


Would it be possible for you to post a sample image?


Hello ctrueden

sorry I am new in this community, I hope I did well: I have uploaded 4 jpg images using the upload tool above. The fourth is a vertical cross section near the center of the cylinder (tube with roots in soil), and the other three are axial cross sections near bottom (11), center (32) and near top (52). Optimal would be if the bottom and top slices could be scaled to the center slice, also some shifting is necessary. Is there an automated procedure, to do this for the entire set?

Thanks for help,


Lupi_105_axial_slice_11of64 Lupi_105_axial_slice_32of64 Lupi_105_axial_slice_52of64 Lupi_105_vertical_slice


Hello @APo,

Register Virtual Stack Slices is based on landmarks and needs more rich-content images. You might wan to try StackReg.


Hello Iarganda,

Thanks for that comment. I installed stackreg and turboreg, but it does not start, error message is “StackReg_ not up-to-date because 1 source files are not up-to-date (C:\Users\POHLME~1\AppData\Local\Temp\java4343662852278282444\src\main\java\StackReg_.java)”
But there is no folder ~\java… in Temp.
Should I update Java? I have version 8 update 45.



Hello @APo,

If you are using Fiji, you can install both plugins by simply enabling the BIG-EPFL update site.


Hello iarganda,

Sorry, but this does not help. Same error message: “StackReg_ not up-to-date because 1 source files are not up-to-date (C:\Users\POHLME~1\AppData\Local\Temp\java7671004949133596161\src\main\java\StackReg_.java)”
Can I remove the old stackreg and turboreg plugins, and update again from BIG_EPFL?


This is a common issue, as you can find by searching for the error message on this forum.

As suggested on another thread:

So, yes:

Just try it :wink:


Hello imagejan,

I think the problem origins from windows/java. I tried on a linux machine, and it works well.