MIC-DKFZ / TractSeg

Automatic White Matter Bundle Segmentation
Apache License 2.0
227 stars 76 forks source link

Tractometry results plots with negative average metric values #243

Open ryn-thorn opened 1 year ago

ryn-thorn commented 1 year ago

I processed two datasets through the tractometry pipeline as suggest here . The two datasets are unrelated but otherwise quite similar - similar MRI acquisition parameters, the same preprocessing.

The first dataset returned tractometry results histograms as expected. And so I adapted by processing script and subjects.txt file to the new dataset, only changing paths and subject IDs. Nothing about the TractSeg processing pipeline I used was changed.

However, the second dataset returned plots with negative averages. See FA below:

tractometry_result_dti_fa

I looked at five different diffusion metrics and all five have varying but partially overlapping groups of tracts with negative average values on these plots.

Since I'd successfully processed one dataset without issue already, I suspected the second dataset itself was to blame. However, I can find nothing at all about the second dataset that would cause this. The metric maps used for the analysis do not contain negative values or anything like that.

The only thing that seems vaguely related is the fact that, for some of my subjects in the troublesome dataset, some tracts are empty and values along those tracts in the individual tractometry output .csv files have a value of 0. However, this doesn't seem like it should cause negative average values, right?

I've tried rerunning the dataset through the entirety of every TractSeg step, and I've even tried isolating subjects from this dataset.

Does anyone have any idea why this might be happening?

ryn-thorn commented 1 year ago

Update: I've since tried this same process with two additional datasets, both of which have resulted in negative tractometry values. I've also tried this same pipeline on another machine (first machine is MacOS 12.4, second machine is Ubuntu (version unknown at this time)). Additionally, I've tried this on both raw data and artifact corrected data, both of which return negative values. I believe this is a TractSeg issue.

ryn-thorn commented 1 year ago

Update 2: I've figured out that, for some subjects, certain tracts are not generated. So, in certain subjects tractometry .csv files, certain tracts contain all 0s. I worked around this by generating only plots for tracts that exist, essentially circumventing to 0s. However, I still see plots with negative values. When I go an examine every single value going into the plots, there are still no negative values and there are no 0 values. Clearly these plots are not straight forward averages. It would be very helpful to get some clarity about how these plots are generated so that I can understand what they're actually telling me, since they are not straight forward averages. If they are supposed to be straight averages, then I believe there may be an issue with TractSeg.

wasserth commented 1 year ago

Each of the 100 values is the average of the metric at all points within one segment. The way a streamline is split into segments is a bit more complicated, but the following figure gives you a good impression of what a segments look like: https://github.com/MIC-DKFZ/TractSeg/blob/master/resources/Compare_tractometry_methods.png