Missing documentation for padding
cl445 opened this issue · 2 comments
I do not get what padding is exactly doing. How is the connection to the parameter?
The padding is a resample padding value (terminology borrowed from niftyreg).
When resampling a non orthogonal image to an orthogonal image (for example gantry tilted ct image) there are voxels in the destination image that do not have a corresponding voxel(s) in the source image. At the borders/corners of the destination image. These need to get a value and for this we use the padding value provided.
For example on an average MR image the background value would be 0 so it is advisable to resample using the padding value 0. However for CT the background value will be -1000 so there it would be best to use -1000.
To be short the padding is only used if resampling is enabled (for gantry tilt or inconsistent slice increment) and should in general be set to the background value of the image.
Some examples can be found here
https://icometrix.github.io/dicom2nifti/readme.html#command-line
Thank you, that helped a lot!