Frequently Asked Questions
1. How do I choose the weights? What does each of the weights really mean?
2. How do I choose the initial and final deformations? What do they mean?
3. Can bUnwarpJ register 3D images?
4. How do I cite bUnwarpJ?
5. Can I run bUnwarpJ without the graphical interface?
6. My result images are 32-bit although my input images are 8-bit, is that a bug?
7. How do I integrate the SIFT/MOPS results into bUnwarpJ?
8. What does "source and target" mean? Which image is being tranformed?
1. How do I choose the weights? What does each of the weights really mean?
The weights need to be chosen experimentally, test and error is the only way of knowing which are the best weights to register your images, but let 's talk about them in detail:
Divergence and curl weights
The divergence and curl weights regularize the deformation by penalizing the divergence and curl of the deformation vector field. In other words, we penalize vector fields with many points like this:




These are atractor points that make the deformation too rough. One of them would not be a problem (it could be just a rotation), but many yes. So controlling them we make the deformation smooth. If you see that your transformations get too rough, it is a good idea to use them. 0.1 and 0.1 are usually good values if there's no prior knowledge about the deformation shape.
Landmark weight
It forces the deformations to fit the landmark points on both images. Set it to 1.0 unless you're not using landmarks.
Image weight
This is the weight to control the pixel values differences. Leave it to 1.0 unless you want to do for instance landmark-only registration.
Consistency weight
It forces the resulting deformations to be one (source to target) as close as possible to the inverse of the other one (target to source). Values between 10.0 and 30.0 usually work fine. It is only taken into account for registration modes "Fast" or "Accurate".
2. How do I choose the initial and final deformations? What do they mean?
These values determine the level of detail of the initial and final deformations. In bUnwarpJ this is defined by the number of B-splines that we use to represent the deformations:
| Deformation | Number of intervals (in the B-spline grid) |
| Very Coarse | 1x1 |
| Coarse | 2x2 |
| Fine | 4x4 |
| Very Fine | 8x8 |
| Super Fine | 16x16 |
How to choose the initial and final deformation? It depends on how misaligned your images are. If they start very far away from the right alignment, it is usually a good idea to go from "Very Coarse" to "Very Fine". If they start close to the right alignment, using a very coarse initial deformation could cause the algorithm to fail. So, in that case, it would be enough to set initial deformation to "Fine" and final deformation to "Very Fine". Use "Super Fine" only when you need a very high level of accuracy, because it makes the algorithm quite slower depending on the image sizes.
3. Can bUnwarpJ register 3D images?
Unfortunately, no. If you call bUnwarpJ with two stacks as input images, it will use the second slice of every stack as the corresponding mask of the first slice. If you're looking for 3D image registration software, you may want to have a look at Elastix, an excellent open source toolkit to peform image registration written in ITK.
4. How do I cite bUnwarpJ?
The corresponding paper citation is here.
5. Can I run bUnwarpJ without the graphical interface?
Yes, you can. You have different possibilities:
- You could call the program from the command line as explained in theuser manual,
- or you can make a macro call in batch mode,
- or you could as well create a script and call the method bUnwarpJ_.alignImagesBatch.
6. My result images are 32-bit although my input images are 8-bit, is that a bug?
No this is not a bug. To calculate the elastic-transformed images bUnwarpJ needs to interpolate the pixel values, so the first step in the process consists of converting the 8-bit (byte) images into 32-bit (float). You may want to convert them back to 8-bit after registration (Image > Type > 8-bit) and adjust the contrast (Process > Enhance Constrast).
7. How do I integrate the SIFT/MOPS results into bUnwarpJ?
If you are using the ImageJ graphical interface, wait until the SIFT/MOPS plugin shows the results and then call immediately bUnwarpJ. The correspondences found after the SIFT or MOPS algorithms are automatically converted into bUnwarpJ landmarks. Please, be aware that if you touch any of the input images before calling bUnwarpJ you will probably loose the point selections (SIFT/MOPS correspondences) of that image and then no landmark will be displayed.
If you do a macro call or use the method bUnwarpJ_.alignImagesBatch, the landmarks will be read as well from the point selections of the input images.
If you are calling bUnwarpJ from the command line, you will have to save the SIFT/MOPS point selections in a file and use the file name in the command line call.
8. What does "source and target" mean? Which image is being tranformed?
The "source" image is the image being transformed, i.e. the moving image, while the "target" image is the fixed image. In the "Accurate" and "Fast" modes, both images work as source and target.
