Inheritance diagram for nipype.interfaces.matlab:
General matlab interface code
Bases: nipype.interfaces.base.CommandLine
Interface that runs matlab code
>>> import nipype.interfaces.matlab as matlab
>>> mlab = matlab.MatlabCommand()
>>> mlab.inputs.script = "which('who')"
>>> out = mlab.run()
Attributes
output_spec |
Methods
aggregate_outputs([runtime, needed_outputs]) | Collate expected outputs and check for existence |
help([returnhelp]) | |
input_spec | |
raise_exception(runtime) | |
run(**inputs) | Execute this interface. |
set_default_matlab_cmd(matlab_cmd) | Set the default MATLAB command line for MATLAB classes. |
set_default_mfile(mfile) | Set the default MATLAB script file format for MATLAB classes. |
set_default_paths(paths) | Set the default MATLAB paths for MATLAB classes. |
set_default_terminal_output(output_type) | Set the default output type for FSL classes. |
version_from_command([flag]) |
initializes interface to matlab (default ‘matlab -nodesktop -nosplash’)
Collate expected outputs and check for existence
sets base command, immutable
command plus any arguments (args) validates arguments and generates command line
alias of MatlabInputSpec
Execute this interface.
This interface will not raise an exception if runtime.returncode is non-zero.
Parameters: | inputs : allows the interface settings to be updated |
---|---|
Returns: | results : an InterfaceResult object containing a copy of the instance that was executed, provenance information and, if successful, results : |
Set the default MATLAB command line for MATLAB classes.
This method is used to set values for all MATLAB subclasses. However, setting this will not update the output type for any existing instances. For these, assign the <instance>.inputs.matlab_cmd.
Set the default MATLAB script file format for MATLAB classes.
This method is used to set values for all MATLAB subclasses. However, setting this will not update the output type for any existing instances. For these, assign the <instance>.inputs.mfile.
Set the default MATLAB paths for MATLAB classes.
This method is used to set values for all MATLAB subclasses. However, setting this will not update the output type for any existing instances. For these, assign the <instance>.inputs.paths.
Set the default output type for FSL classes.
This method is used to set the default output type for all fSL subclasses. However, setting this will not update the output type for any existing instances. For these, assign the <instance>.inputs.output_type.
Bases: nipype.interfaces.base.CommandLineInputSpec
Basic expected inputs to Matlab interface
Methods
add_class_trait(name, *trait) | Adds a named trait attribute to this class. |
add_trait(name, *trait) | Adds a trait attribute to this object. |
add_trait_category(category) | Adds a trait category to a class. |
add_trait_listener(object[, prefix]) | |
all_trait_names() | Returns the list of all trait names, including implicitly defined traits. |
base_trait(name) | Returns the base trait definition for a trait attribute. |
class_default_traits_view() | Returns the name of the default traits view for the class. |
class_editable_traits() | Returns an alphabetically sorted list of the names of non-event trait attributes associated with the current class. |
class_trait_names(**metadata) | Returns a list of the names of all trait attributes whose definitions match the set of metadata criteria specified. |
class_trait_view([name, view_element]) | |
class_trait_view_elements() | Returns the ViewElements object associated with the class. |
class_traits(**metadata) | Returns a dictionary containing the definitions of all of the trait attributes of the class that match the set of metadata criteria. |
clone_traits([traits, memo, copy]) | Clones a new object from this one, optionally copying only a specified set of traits. |
configure_traits([filename, view, kind, ...]) | Creates and displays a dialog box for editing values of trait attributes, as if it were a complete, self-contained GUI application. |
copy_traits(other[, traits, memo, copy]) | Copies another object’s trait attributes into this one. |
copyable_trait_names(**metadata) | Returns the list of trait names to copy or clone by default. |
default_traits_view() | Returns the name of the default traits view for the object’s class. |
edit_traits([view, parent, kind, context, ...]) | Displays a user interface window for editing trait attribute values. |
editable_traits() | Returns an alphabetically sorted list of the names of non-event trait attributes associated with the current object. |
get(**kwargs) | Returns traited class as a dict |
get_hashval([hash_method]) | Return a dictionary of our items with hashes for each file. |
get_traitsfree(**kwargs) | Returns traited class as a dict |
has_traits_interface(*interfaces) | Returns whether the object implements a specified traits interface. |
items() | Name, trait generator for user modifiable traits |
on_trait_change(handler[, name, remove, ...]) | Causes the object to invoke a handler whenever a trait attribute matching a specified pattern is modified, or removes the association. |
on_trait_event(handler[, name, remove, ...]) | Causes the object to invoke a handler whenever a trait attribute matching a specified pattern is modified, or removes the association. |
print_traits([show_help]) | Prints the values of all explicitly-defined, non-event trait attributes on the current object, in an easily readable format. |
remove_trait(name) | Removes a trait attribute from this object. |
remove_trait_listener(object[, prefix]) | |
reset_traits([traits]) | Resets some or all of an object’s trait attributes to their default values. |
set([trait_change_notify]) | Shortcut for setting object trait attributes. |
set_trait_dispatch_handler(name, klass[, ...]) | Sets a trait notification dispatch handler. |
sync_trait(trait_name, object[, alias, ...]) | Synchronizes the value of a trait attribute on this object with a trait attribute on another object. |
trait(name[, force, copy]) | Returns the trait definition for the name trait attribute. |
trait_context() | Returns the default context to use for editing or configuring traits. |
trait_get(*names, **metadata) | Shortcut for getting object trait attributes. |
trait_items_event(event_trait,name,items_event) | |
trait_monitor(handler[, remove]) | Adds or removes the specified handler from the list of active monitors. |
trait_names(**metadata) | Returns a list of the names of all trait attributes whose definitions match the set of metadata criteria specified. |
trait_property_changed(...) | |
trait_set([trait_change_notify]) | Shortcut for setting object trait attributes. |
trait_setq(**traits) | Shortcut for setting object trait attributes. |
trait_subclasses([all]) | Returns a list of the immediate (or all) subclasses of this class. |
trait_view([name, view_element]) | Gets or sets a ViewElement associated with an object’s class. |
trait_view_elements() | Returns the ViewElements object associated with the object’s class. |
trait_views([klass]) | Returns a list of the names of all view elements associated with the current object’s class. |
traits(**metadata) | Returns a dictionary containing the definitions of all of the trait attributes of this object that match the set of metadata criteria. |
traits_init() | |
traits_inited([True]) | |
validate_trait(name, value) | Validates whether a value is legal for a trait. |
Initialize handlers and inputs
Adds a named trait attribute to this class.
Parameters: | name : string
trait : a trait or a value that can be converted to a trait using Trait()
|
---|
Adds a trait attribute to this object.
Parameters: | name : string
trait : trait or a value that can be converted to a trait by Trait()
|
---|
Adds a trait category to a class.
Returns the list of all trait names, including implicitly defined traits.
Returns the base trait definition for a trait attribute.
Parameters: | name : string
|
---|
Returns the name of the default traits view for the class.
Returns an alphabetically sorted list of the names of non-event trait attributes associated with the current class.
Returns a list of the names of all trait attributes whose definitions match the set of metadata criteria specified.
Parameters: | metadata : dictionary
|
---|
Returns the ViewElements object associated with the class.
The returned object can be used to access all the view elements associated with the class.
Returns a dictionary containing the definitions of all of the trait attributes of the class that match the set of metadata criteria.
Parameters: | metadata : dictionary
|
---|
Clones a new object from this one, optionally copying only a specified set of traits.
Parameters: | traits : list of strings
memo : dictionary
copy : None | ‘deep’ | ‘shallow’
|
---|---|
Returns: | The newly cloned object. : |
Creates and displays a dialog box for editing values of trait attributes, as if it were a complete, self-contained GUI application.
Parameters: | filename : string
view : view or string
kind : string
edit : Boolean
context : object or dictionary
handler : Handler object
id : string
scrollable : Boolean
|
---|
Copies another object’s trait attributes into this one.
Parameters: | other : object
traits : list of strings
memo : dictionary
copy : None | ‘deep’ | ‘shallow’
|
---|---|
Returns: | A list of attributes that the method was unable to copy, : which is empty if all the attributes were successfully copied. : |
Returns the list of trait names to copy or clone by default.
Returns the name of the default traits view for the object’s class.
Displays a user interface window for editing trait attribute values.
Parameters: | view : view or string
parent : window handle
kind : string
context : object or dictionary
handler : Handler object
id : string
scrollable : Boolean
|
---|
Returns an alphabetically sorted list of the names of non-event trait attributes associated with the current object.
Returns traited class as a dict
Augments the trait get function to return a dictionary without notification handles
Return a dictionary of our items with hashes for each file.
Searches through dictionary items and if an item is a file, it calculates the md5 hash of the file contents and stores the file name and hash value as the new key value.
However, the overall bunch hash is calculated only on the hash value of a file. The path and name of the file are not used in the overall hash calculation.
Returns: | dict_withhash : dict
hashvalue : str
|
---|
Returns traited class as a dict
Augments the trait get function to return a dictionary without any traits. The dictionary does not contain any attributes that were Undefined
Returns whether the object implements a specified traits interface.
Parameters: | interfaces : one or more traits Interface (sub)classes. |
---|
Name, trait generator for user modifiable traits
Causes the object to invoke a handler whenever a trait attribute matching a specified pattern is modified, or removes the association.
Parameters: | handler : function
name : string
remove : Boolean
dispatch : string
|
---|
Causes the object to invoke a handler whenever a trait attribute matching a specified pattern is modified, or removes the association.
Parameters: | handler : function
name : string
remove : Boolean
dispatch : string
|
---|
Prints the values of all explicitly-defined, non-event trait attributes on the current object, in an easily readable format.
Parameters: | show_help : Boolean
|
---|
Removes a trait attribute from this object.
Parameters: | name : string
|
---|
Resets some or all of an object’s trait attributes to their default values.
Parameters: | traits : list of strings
|
---|---|
Returns: | A list of attributes that the method was unable to reset, which is empty : if all the attributes were successfully reset. : |
Shortcut for setting object trait attributes.
Parameters: | trait_change_notify : Boolean
traits : list of key/value pairs
|
---|---|
Returns: | self :
|
Sets a trait notification dispatch handler.
Synchronizes the value of a trait attribute on this object with a trait attribute on another object.
Parameters: | name : string
object : object
alias : string
mutual : Boolean or integer
remove : Boolean or integer
|
---|
Returns the trait definition for the name trait attribute.
Parameters: | name : string
force : Boolean
copy : Boolean
|
---|
Returns the default context to use for editing or configuring traits.
Shortcut for getting object trait attributes.
Parameters: | names : list of trait attribute names
|
---|---|
Returns: | A dictionary whose keys are the names passed as arguments and whose : values are the corresponding trait values : |
Adds or removes the specified handler from the list of active monitors.
Parameters: | handler : function
remove : boolean
|
---|
Returns a list of the names of all trait attributes whose definitions match the set of metadata criteria specified.
Parameters: | metadata : dictionary
|
---|
Shortcut for setting object trait attributes.
Parameters: | trait_change_notify : Boolean
traits : list of key/value pairs
|
---|---|
Returns: | self :
|
Shortcut for setting object trait attributes.
Parameters: | traits : list of key/value pairs
|
---|---|
Returns: | self :
|
Returns a list of the immediate (or all) subclasses of this class.
Parameters: | all : Boolean
|
---|
Gets or sets a ViewElement associated with an object’s class.
Parameters: | name : string
view_element : a ViewElement object
|
---|---|
Returns: | A view element. : |
Returns the ViewElements object associated with the object’s class.
The returned object can be used to access all the view elements associated with the class.
Returns a list of the names of all view elements associated with the current object’s class.
Parameters: | klass : a class
|
---|
Returns a dictionary containing the definitions of all of the trait attributes of this object that match the set of metadata criteria.
Parameters: | metadata : dictionary
|
---|
Validates whether a value is legal for a trait.
Returns the validated value if it is valid.