I followed this post to visualize endpoints from an ACT gm/wm interface in mrview and it works great.
I wanted to color the endpoints as a function of whether they belong to a certain ROI, so I used tcksample to sample the endpoints from the ROI mask (zeros and ones), and used the resulting tsf file to color the endpoints, but I get unexpected results. I would expect all endpoints in the ROI to be white (scalar value = 1) and all endpoints outside the ROI to be black (scalar value = 0), but this is what I get:
While most endpoints within the ROI are white and the majority outside are black, I get some white endpoints outside the ROI and some black endpoints inside the ROI.
Could it be due to color interpolation ?
Is there any way to disable interpolation for track coloring using tsf files? Ideally I would ideally like to only see white and black dots, but there are some intermediate (yellow/orange) colors.
Here are the commands I used to isolate the endpoints of the tracks passing through the ROI and creating the tsf file:
$ tckedit ../DWI/DWI_aligned_upsampled_wb_gmwmi.tck audCxLeftROIMW5.tck -include auditCortexLeftExpSurfaceWM5.nii tckedit: [done] 20000000 read, 448400 written $ tckresample -endpoints audCxLeftROIMW5.tck audCxLeftROIMW5_endpoints.tck tckresample: [done] resampling streamlines (count: 448400, skipped: 0) $ tcksample audCxLeftROIMW5_endpoints.tck auditCortexLeftExpSurfaceWM5.nii audCxLeftROIMW5_endpoints.tsf tcksample: [100%] Sampling values underlying streamlines
I’m using mrtrix version 3.0.0, built on May 16 on a virtual machine running Ubuntu 16.04