Beispiel #1
0
    def _gen_outfilename(self):
        from nipype.utils.filemanip import split_filename as split_f

        _, in_brain, _ = split_f(self.inputs.inb_file)
        _, ref, _ = split_f(self.inputs.refb_file)

        if isdefined(self.inputs.xp):
            outname = self.inputs.xp
        else:
            outname = in_brain + "_FLIRT-to_" + ref
        return outname
Beispiel #2
0
    def _list_outputs(self):
        outputs = self.output_spec().get()
        if isdefined(self.inputs.out_file):

            if isinstance(self.inputs.out_file, list):
                print([os.path.abspath(out) for out in self.inputs.out_file])
                outputs['out_file'] = [
                    os.path.abspath(out) for out in self.inputs.out_file]
            else:
                outputs['out_file'] = os.path.abspath(self.inputs.out_file)

        return outputs
Beispiel #3
0
    def _list_outputs(self):

        import os
        from nipype.utils.filemanip import split_filename as split_f

        outputs = self._outputs().get()

        path, fname, ext = split_f(self.inputs.inw_file)

        outputs["brain_file"] = os.path.abspath(fname + self.inputs.bs +
                                                ".nii.gz")
        outputs["brain_mask_file"] = os.path.abspath(fname + self.inputs.bs +
                                                     "_mask.nii.gz")

        if isdefined(self.inputs.xp):
            outfile = self.inputs.xp
        else:
            outfile = self._gen_outfilename()

        outputs["warp_file"] = os.path.abspath(outfile + ".nii.gz")
        outputs["transfo_file"] = os.path.abspath(outfile + ".xfm")
        outputs["inv_transfo_file"] = os.path.abspath(outfile + "_inverse.xfm")
        return outputs
Beispiel #4
0
 def _list_outputs(self):
     outputs = self.output_spec().get()
     if isdefined(self.new_value):
         outputs['out_file'] = self.new_value
         print(outputs['out_file'])
     return outputs