qsiprep
qsiprep copied to clipboard
[WIP] ENH: Add SIFT-classic
Related to #431.
Changes proposed in this pull request
-
use_sift
now takes as input "1" or "2" (orfalse
) to differentiate between sift versions - A separate SIFT1 class is created which takes in FOD, Tck and optional final streamline count (default 1million), and outputs filtered tractogram which becomes the main output of tractography fed into other workflows.
Documentation that should be reviewed
I have not updated documentation yet, but recon page would be affected
Hmmm, the command is being generated and executed without error, but only the un-sifted tractogram is ultimately output, and under the sift name.
I think I confused output_node vs ds_tck_file, will fix and retest.
This looks awesome - I'm not going to be able to code for the next few weeks, so I'll add write access for you on this repo
Hi @mattcieslak,
Finally returned to this after a year or so and got something working.
Here is a summary of changes:
-
use_sift
now takes as input "1" or "2" (or false) to differentiate between sift versions - iFod2 now has a
sift_tracks
output_spec for SIFT1 outputs. - SIFT1 final streamline count can be set by specifying
term_number
in thesift_params
in a given recon_spec. Otherwise, it will default to the defaulttcksift
behavior (until streamline densities match the FOD lobe integrals).
Still in progress, might need some help with:
- I have tested this out locally, but I imagine I should set up a test on the repo.
- I don't think the
use_sift
options of 1, 2, or False is the most elegant, as I imagine a user could want to use SIFT2 for atlas connectivity and SIFT1 for tractography in a single recon specification. - Add documentation
- Add an example recon_spec with SIFT1, perhaps something like Mrtrix-->PyAFQ spec, but starting with making a dense 10M streamline tractogram, SIFTing it to 1M, and then start PyAFQ.
tree
on recon out directory (note the desc-sifttracks
file):
├── sub-READ1003_ses-T1_acq-MDDW64_dir-PA_space-T1w_desc-preproc_desc-csfFOD_msmtcsd.txt
├── sub-READ1003_ses-T1_acq-MDDW64_dir-PA_space-T1w_desc-preproc_desc-csfFODmtnormed_msmtcsd.mif.gz
├── sub-READ1003_ses-T1_acq-MDDW64_dir-PA_space-T1w_desc-preproc_desc-gmFOD_msmtcsd.txt
├── sub-READ1003_ses-T1_acq-MDDW64_dir-PA_space-T1w_desc-preproc_desc-gmFODmtnormed_msmtcsd.mif.gz
├── sub-READ1003_ses-T1_acq-MDDW64_dir-PA_space-T1w_desc-preproc_desc-mtinliermask_msmtcsd.nii.gz
├── sub-READ1003_ses-T1_acq-MDDW64_dir-PA_space-T1w_desc-preproc_desc-mtnorm_msmtcsd.nii.gz
├── sub-READ1003_ses-T1_acq-MDDW64_dir-PA_space-T1w_desc-preproc_desc-sifttracks_ifod2.tck
├── sub-READ1003_ses-T1_acq-MDDW64_dir-PA_space-T1w_desc-preproc_desc-tracks_ifod2.tck
├── sub-READ1003_ses-T1_acq-MDDW64_dir-PA_space-T1w_desc-preproc_desc-wmFOD_msmtcsd.txt
└── sub-READ1003_ses-T1_acq-MDDW64_dir-PA_space-T1w_desc-preproc_desc-wmFODmtnormed_msmtcsd.mif.gz
0 directories, 10 files
Thoughts?
2. iFod2 now has a
sift_tracks
output_spec for SIFT1 outputs.
I see now that this would be an issue for using the SIFT outputs for other workflows (e.g., PyAFQ), since they tend to look for the tck_file
field. Will think about best way to change that.
Edit: addressed in commit below, where SIFT1 tck outfile is ported as outputnode
's tck_file
. Confirmed that the right sifted TCK is now being ported into AFQ segmentation. But still does not solve the problem if one wants to use both SIFT1 and SIFT2 outputs for different purposes.
@mattcieslak do you think it could make sense to have SIFT1 become a separate entity from the tractography workflow? That way, in theory one could run whole brain tractography, use SIFT2 weights for connectivity, but also be able to use a SIFT1'd tractogram for tract segmentation, all in one recon spec.