def _get_fixed_params(im):
""" Parameters that the user has no influence on. Mostly chosen
bases on the input images.
"""
p = Parameters()
if not isinstance(im, np.ndarray):
return p
# Dimension of the inputs
p.FixedImageDimension = im.ndim
p.MovingImageDimension = im.ndim
# Always write result, so I can verify
p.WriteResultImage = True
# How to write the result
tmp = DTYPE_NP2ITK[im.dtype.name]
p.ResultImagePixelType = tmp.split('_')[-1].lower()
p.ResultImageFormat = "mhd"
# Done
return p
评论列表
文章目录