class_docstr: Create one Nifti file from a set of DICOM files. Can optionally embed
  meta data.
  
  Example
  -------
  
  >>> from nipype.interfaces.dcmstack import DcmStack
  >>> stacker = DcmStack()
  >>> stacker.inputs.dicom_files = 'path/to/series/'
  >>> stacker.run() # doctest: +SKIP
  >>> result.outputs.out_file # doctest: +SKIP
  '/path/to/cwd/sequence.nii.gz'
class_docstr_tok: ["Create","one","Nifti","file","from","a","set","of","DICOM","files",".","Can","optionally","embed","meta","data",".","Example","--","--","--","-",">",">",">","from","nipype.interfaces.dcmstack","import","DcmStack",">",">",">","stacker","=","DcmStack","(",")",">",">",">","stacker.inputs.dicom_files","=","'path\/to\/series\/'",">",">",">","stacker.run","(",")","#","doctest",":","+SKIP",">",">",">","result.outputs.out_file","#","doctest",":","+SKIP","'\/path\/to\/cwd\/sequence.nii.gz","'"]
code: def _get_filelist(self, trait_input):
      if isinstance(trait_input, (str, bytes)):
          if op.isdir(trait_input):
              return glob(op.join(trait_input, "*.dcm"))
          else:
              return glob(trait_input)
  
      return trait_input
  
imports: import os
  from os import path
  import string
  import errno
  from glob import glob
  import nibabel
  import imghdr
  from .base import TraitedSpec, DynamicTraitedSpec, InputMultiPath, File, Directory, traits, BaseInterface, isdefined, Undefined
label_desc: Use image node_id 1 for calling the DcmStack obj's underlying member method code with example usage: obj._get_filelist(trait_input) and returns: trait_input, glob, glob