trx.workflows#

Attributes#

Functions#

convert_dsi_studio(in_dsi_tractogram, in_dsi_fa, ...)

convert_tractogram(in_tractogram, out_tractogram, ...)

tractogram_simple_compare(in_tractograms, reference)

verify_header_compatibility(in_files)

tractogram_visualize_overlap(in_tractogram, reference)

validate_tractogram(in_tractogram, reference, ...[, ...])

_load_streamlines_from_csv(positions_csv)

Load streamlines from CSV file.

_load_streamlines_from_arrays(positions, offsets)

Load streamlines from position and offset arrays.

_apply_spatial_transforms(streamlines, reference, ...)

Apply spatial transforms and verify streamlines.

_write_header(tmp_dir_name, reference, streamlines)

Write header file.

_write_streamline_data(tmp_dir_name, streamlines, ...)

Write streamline position and offset data.

_normalize_dtype(dtype_str)

Normalize dtype string format.

_write_data_array(tmp_dir_name, subdir_name, args[, ...])

Write data array to file.

generate_trx_from_scratch(reference, out_tractogram[, ...])

Generate TRX file from scratch using various input formats.

manipulate_trx_datatype(in_filename, out_filename, ...)

Module Contents#

trx.workflows.dipy_available = True[source]#
trx.workflows.convert_dsi_studio(in_dsi_tractogram, in_dsi_fa, out_tractogram, remove_invalid=True, keep_invalid=False)[source]#
trx.workflows.convert_tractogram(in_tractogram, out_tractogram, reference, pos_dtype='float32', offsets_dtype='uint32')[source]#
trx.workflows.tractogram_simple_compare(in_tractograms, reference)[source]#
trx.workflows.verify_header_compatibility(in_files)[source]#
trx.workflows.tractogram_visualize_overlap(in_tractogram, reference, remove_invalid=True)[source]#
trx.workflows.validate_tractogram(in_tractogram, reference, out_tractogram, remove_identical_streamlines=True, precision=1)[source]#
trx.workflows._load_streamlines_from_csv(positions_csv)[source]#

Load streamlines from CSV file.

trx.workflows._load_streamlines_from_arrays(positions, offsets)[source]#

Load streamlines from position and offset arrays.

trx.workflows._apply_spatial_transforms(streamlines, reference, space_str, origin_str, verify_invalid, offsets)[source]#

Apply spatial transforms and verify streamlines.

trx.workflows._write_header(tmp_dir_name, reference, streamlines)[source]#

Write header file.

trx.workflows._write_streamline_data(tmp_dir_name, streamlines, positions_dtype, offsets_dtype)[source]#

Write streamline position and offset data.

trx.workflows._normalize_dtype(dtype_str)[source]#

Normalize dtype string format.

trx.workflows._write_data_array(tmp_dir_name, subdir_name, args, is_dpg=False)[source]#

Write data array to file.

trx.workflows.generate_trx_from_scratch(reference, out_tractogram, positions_csv=False, positions=False, offsets=False, positions_dtype='float32', offsets_dtype='uint64', space_str='rasmm', origin_str='nifti', verify_invalid=True, dpv=None, dps=None, groups=None, dpg=None)[source]#

Generate TRX file from scratch using various input formats.

trx.workflows.manipulate_trx_datatype(in_filename, out_filename, dict_dtype)[source]#