nipype.interfaces.diffusion_toolkit.postproc module¶
Provides interfaces to various commands provided by diffusion toolkit
SplineFilter¶
Bases: CommandLine
Wrapped executable:
spline_filter
.Smoothes TrackVis track files with a B-Spline filter.
Helps remove redundant track points and segments (thus reducing the size of the track file) and also make tracks nicely smoothed. It will NOT change the quality of the tracks or lose any original information.
Example
>>> import nipype.interfaces.diffusion_toolkit as dtk >>> filt = dtk.SplineFilter() >>> filt.inputs.track_file = 'tracks.trk' >>> filt.inputs.step_length = 0.5 >>> filt.run()
- step_lengtha float
In the unit of minimum voxel size. Maps to a command-line argument:
%f
(position: 1).- track_filea pathlike object or string representing an existing file
File containing tracks to be filtered. Maps to a command-line argument:
%s
(position: 0).
- argsa string
Additional parameters to the command. Maps to a command-line argument:
%s
.- environa dictionary with keys which are a bytes or None or a value of class ‘str’ and with values which are a bytes or None or a value of class ‘str’
Environment variables. (Nipype default value:
{}
)- output_filea pathlike object or string representing a file
Target file for smoothed tracks. Maps to a command-line argument:
%s
(position: 2). (Nipype default value:spline_tracks.trk
)smoothed_track_file : a pathlike object or string representing an existing file
TrackMerge¶
Bases: CommandLine
Wrapped executable:
track_merge
.Merges several TrackVis track files into a single track file.
An id type property tag is added to each track in the newly merged file, with each unique id representing where the track was originally from. When the merged file is loaded in TrackVis, a property filter will show up in Track Property panel. Users can adjust that to distinguish and sub-group tracks by its id (origin).
Example
>>> import nipype.interfaces.diffusion_toolkit as dtk >>> mrg = dtk.TrackMerge() >>> mrg.inputs.track_files = ['track1.trk','track2.trk'] >>> mrg.run()
- track_filesa list of items which are a pathlike object or string representing an existing file
File containing tracks to be filtered. Maps to a command-line argument:
%s...
(position: 0).
- argsa string
Additional parameters to the command. Maps to a command-line argument:
%s
.- environa dictionary with keys which are a bytes or None or a value of class ‘str’ and with values which are a bytes or None or a value of class ‘str’
Environment variables. (Nipype default value:
{}
)- output_filea pathlike object or string representing a file
Target file for merged tracks. Maps to a command-line argument:
%s
(position: -1). (Nipype default value:merged_tracks.trk
)track_file : a pathlike object or string representing an existing file