dosma.apply_warp
- dosma.apply_warp(moving: Union[dosma.core.med_volume.MedicalVolume, str, Sequence[Union[dosma.core.med_volume.MedicalVolume, str]]], transform: Optional[Union[str, Sequence[str]]] = None, out_registration: Optional[nipype.interfaces.elastix.registration.RegistrationOutputSpec] = None, output_path: Optional[Union[str, Sequence[str]]] = None, rtype: type = <class 'dosma.core.med_volume.MedicalVolume'>, num_threads: int = 1, show_pbar: bool = False, num_workers: int = 0) Union[dosma.core.med_volume.MedicalVolume, str][source]
Apply transform(s) to moving image using transformix.
Use transformix to apply a transform on an input image. The transform(s) is/are specified in the transform-parameter file(s).
- Parameters
moving (MedicalVolume(s) or str(s)) – The moving/source image to transform.
transform (str(s)) – Paths to transform files to be used by transformix. If multiple files provided, transforms will be applied sequentially. If None, will be determined by out_registration.transform.
out_registration (RegistrationOutputSpec(s)) – Outputs from elastix registration using nipype. Must be specified if transform is None.
output_path (str) – Output directory to store files.
rtype (type, optional) – Return type - either MedicalVolume or str. If str, output_path must be specified. Defaults to MedicalVolume.
num_threads (int, optional) – Number of threads to use for registration. If None, defaults to 1.
show_pbar (bool, optional) – If True, show progress bar when applying transforms.
- Returns
- The medical volume or nifti file corresponding to the volume.
See rtype for details.
- Return type
MedVolOrPath