Tckgen gives error "mask is empty"

Hello,

I’m facing an issue where the mask appears empty when running tckgen for tractography in MRtrix3.

  • I generated a mask using dwi2mask from the DWI image.
  • When I view the mask in mrview, it looks fine and contains regions of interest.
  • I ran tckgen with this mask:
tckgen wm_fod.mif tracks.tck \
  -seed_dynamic wm_fod.mif \
  -act 5tt.mif \
  -backtrack -crop_at_gmwmi \
  -select 10M \
  -cutoff 0.06 \
  -mask mask.mif

Despite this, I get the error:
“Processing mask is empty; check input images / registration.”

What I’ve Tried:

  • Converted the mask to float32 (mrconvert mask.mif mask_float.mif), but the problem persists.
  • Checked the transformations with mrinfo – they seem aligned.

Question:

  • Could this be a registration issue, or is the mask format the problem?
  • Any suggestions for troubleshooting an empty mask in tckgen?

Thanks for your help!