class_docstr: Performs connectivity mapping and outputs the result as a NetworkX graph and a Matlab matrix
  
  Example
  -------
  
  >>> import nipype.interfaces.cmtk as cmtk
  >>> conmap = cmtk.CreateMatrix()
  >>> conmap.roi_file = 'fsLUT_aparc+aseg.nii'
  >>> conmap.tract_file = 'fibers.trk'
  >>> conmap.run()                 # doctest: +SKIP
code: def _run_interface(self, runtime):
      if isdefined(self.inputs.out_matrix_file):
          path, name, _ = split_filename(self.inputs.out_matrix_file)
          matrix_file = op.abspath(name + ".pck")
      else:
          matrix_file = self._gen_outfilename(".pck")
  
      matrix_mat_file = op.abspath(self.inputs.out_matrix_mat_file)
      path, name, ext = split_filename(matrix_mat_file)
      if not ext == ".mat":
          ext = ".mat"
          matrix_mat_file = matrix_mat_file + ext
  
      if isdefined(self.inputs.out_mean_fiber_length_matrix_mat_file):
          mean_fiber_length_matrix_mat_file = op.abspath(
              self.inputs.out_mean_fiber_length_matrix_mat_file
          )
      else:
          mean_fiber_length_matrix_name = op.abspath(
              self._gen_outfilename("_mean_fiber_length.mat")
          )
  
      if isdefined(self.inputs.out_median_fiber_length_matrix_mat_file):
          median_fiber_length_matrix_mat_file = op.abspath(
              self.inputs.out_median_fiber_length_matrix_mat_file
          )
      else:
          median_fiber_length_matrix_name = op.abspath(
              self._gen_outfilename("_median_fiber_length.mat")
          )
  
      if isdefined(self.inputs.out_fiber_length_std_matrix_mat_file):
          fiber_length_std_matrix_mat_file = op.abspath(
              self.inputs.out_fiber_length_std_matrix_mat_file
          )
      else:
          fiber_length_std_matrix_name = op.abspath(
              self._gen_outfilename("_fiber_length_std.mat")
          )
  
      if not isdefined(self.inputs.out_endpoint_array_name):
          _, endpoint_name, _ = split_filename(self.inputs.tract_file)
          endpoint_name = op.abspath(endpoint_name)
      else:
          endpoint_name = op.abspath(
              self.inputs.out_endpoint_array_name
          )
  
      cmat(
          self.inputs.tract_file,
          self.inputs.roi_file,
          self.inputs.resolution_network_file,
          matrix_file,
          matrix_mat_file,
          endpoint_name,
          self.inputs.count_region_intersections,
      )
      return runtime
  
imports: import pickle
  import os.path
  import numpy
  import nibabel
  import networkx
  from ...None import logging
  from ...utils.filemanip import split_filename
  from ..base import BaseInterface, BaseInterfaceInputSpec, traits, File, TraitedSpec, Directory, OutputMultiPath, isdefined
label_desc: Use image node_id 1 for calling the CreateMatrix obj's underlying member method code with example usage: obj._run_interface(runtime) and returns: runtime