def get_boutiques_output(name, interface, tool_inputs, verbose=False):
 output = {}
 output[u'name'] = name.replace(u'_', u' ').capitalize()
 output[u'id'] = name
 output[u'type'] = u'File'
 output[u'path-template'] = u''
 output[u'optional'] = True
 output_value = interface._list_outputs()[name]
 if ((output_value != u'') and isinstance(output_value, str)):
  for input in tool_inputs:
   if (not input[u'tempvalue']):
    continue
   input_value = input[u'tempvalue']
   if (input[u'type'] == u'File'):
    input_value = os.path.splitext(os.path.basename(input_value))[0]
   if (str(input_value) in output_value):
    output_value = os.path.basename(output_value.replace(input_value, input[u'command-line-key']))
  output[u'path-template'] = os.path.basename(output_value)
 return output

def get_boutiques_output ( name , interface , tool_inputs , verbose = False ) : output = { } output [ u'name' ] = name . replace ( u'_' , u' ' ) . capitalize ( ) output [ u'id' ] = name output [ u'type' ] = u'File' output [ u'path-template' ] = u'' output [ u'optional' ] = True output_value = interface . _list_outputs ( ) [ name ] if ( ( output_value != u'' ) and isinstance ( output_value , str ) ) : for input in tool_inputs : if ( not input [ u'tempvalue' ] ) : continue input_value = input [ u'tempvalue' ] if ( input [ u'type' ] == u'File' ) : input_value = os . path . splitext ( os . path . basename ( input_value ) ) [ 0 ] if ( str ( input_value ) in output_value ) : output_value = os . path . basename ( output_value . replace ( input_value , input [ u'command-line-key' ] ) ) output [ u'path-template' ] = os . path . basename ( output_value ) return output
returns a dictionary containing the boutiques output corresponding to a nipype output .