class_docstr: Convert3d is a command-line tool for converting 3D (or 4D) images between
  common file formats. The tool also includes a growing list of commands for
  image manipulation, such as thresholding and resampling. The tool can also
  be used to obtain information about image files. More information on
  Convert3d can be found at:
  https://sourceforge.net/p/c3d/git/ci/master/tree/doc/c3d.md
  
  
  Example
  =======
  
  >>> from nipype.interfaces.c3 import C3d
  >>> c3 = C3d()
  >>> c3.inputs.in_file = "T1.nii"
  >>> c3.inputs.pix_type = "short"
  >>> c3.inputs.out_file = "T1.img"
  >>> c3.cmdline
  'c3d T1.nii -type short -o T1.img'
  >>> c3.inputs.is_4d = True
  >>> c3.inputs.in_file = "epi.nii"
  >>> c3.inputs.out_file = "epi.img"
  >>> c3.cmdline
  'c4d epi.nii -type short -o epi.img'
class_docstr_tok: ["Convert3d","is","a","command-line","tool","for","converting","3D","(","or","4D",")","images","between","common","file","formats",".","The","tool","also","includes","a","growing","list","of","commands","for","image","manipulation",",","such","as","thresholding","and","resampling",".","The","tool","can","also","be","used","to","obtain","information","about","image","files",".","More","information","on","Convert3d","can","be","found","at",":","https",":","\/\/sourceforge.net\/p\/c3d\/git\/ci\/master\/tree\/doc\/c3d.md","Example","=======",">",">",">","from","nipype.interfaces.c3","import","C3d",">",">",">","c3","=","C3d","(",")",">",">",">","c3.inputs.in_file","=","``","T1.nii","''",">",">",">","c3.inputs.pix_type","=","``","short","''",">",">",">","c3.inputs.out_file","=","``","T1.img","''",">",">",">","c3.cmdline","'c3d","T1.nii","-type","short","-o","T1.img'",">",">",">","c3.inputs.is_4d","=","True",">",">",">","c3.inputs.in_file","=","``","epi.nii","''",">",">",">","c3.inputs.out_file","=","``","epi.img","''",">",">",">","c3.cmdline","'c4d","epi.nii","-type","short","-o","epi.img","'"]
code: def _gen_outfile(self):
      # if many infiles, raise exception
      if (len(self.inputs.in_file) > 1) or (
          "*" in self.inputs.in_file[0]
      ):
          raise AttributeError(
              "Multiple in_files found - specify either `out_file` or `out_files`."
          )
      _, fn, ext = split_filename(self.inputs.in_file[0])
      self.inputs.out_file = fn + "_generated" + ext
      # if generated file will overwrite, raise error
      if os.path.exists(os.path.abspath(self.inputs.out_file)):
          raise OSError(
              "File already found - to overwrite, use `out_file`."
          )
      iflogger.info("Generating `out_file`.")
  
imports: import os
  from glob import glob
  from .base import CommandLineInputSpec, traits, TraitedSpec, File, SEMLikeCommandLine, InputMultiPath, OutputMultiPath, CommandLine, isdefined
  from ..utils.filemanip import split_filename
  from ..None import logging
label_desc: Use image node_id 4 for calling the C3d obj's underlying member method code with example usage: obj._gen_outfile() without return types