def __init__(self, in_file=['path'], tr=1.0, **options): from nipype.interfaces.nipy.preprocess import FmriRealign4d realigner = FmriRealign4d() realigner.inputs.in_file = in_file realigner.inputs.tr = tr for ef in options: setattr(realigner.inputs, ef, options[ef]) self.res = realigner.run()