I think this may have been slightly mis-interpreted:
Is there any way to input a list of seeds rather than having the command loop?
No, I’m afraid not.
I think what @jdtournier means is that you can’t provide “a list of seeds” as in “a list of points in 3D space”. However I suspect @cbajada’s intent was a list of spherical seeds.
So instead of:
tckgen FODs.mif tracks1.tck -mask mask.mif -seed_sphere x1,y1,z1,r1
tckgen FODs.mif tracks2.tck -mask mask.mif -seed_sphere x2,y2,z2,r2
tckgen FODs.mif tracks3.tck -mask mask.mif -seed_sphere x3,y3,z3,r3
tckedit tracks1.tck tracks2.tck tracks3.tck all_tracks.tck
, you can, if you want to, just do:
tckgen FODs.mif all_tracks.tck -mask mask.mif -seed_sphere x3,y3,z3,r3 -seed_sphere x2,y2,z2,r2 -seed_sphere x3,y3,z3,r3
The relative number of seed points drawn from each input seed mechanism is proportional to the volume of each seed. You can even mix & match spherical & image-based seeds if you want to.
mrconvert exclusion_mask.nii -datatype float32 -stride 2,3,4,1 exclusion_out.mif
Not really, for a few reasons:
- The purpose of the “
-stride 2,3,4,1
” option is to make volumes contiguous in memory, but a processing mask should only contain a single volume;
- Mask images should be interpreted by the code as bitwise data, so saving as floating-point is not useful;
- Mask images specifically within
tckgen
are always explicitly loaded into RAM. They are handled slightly differently to the standard image back-end code.
Also, in general, do I need to ensure that all images have the same strides or is MRTrix capable of recognizing any combination?
It’ll accept mixed images, as long as the axes obey the RAS coordinate convention (if the images don’t agree on which direction is positive, you’re at risk of getting erroneous behaviour). The strides simply determine how the image data are arranged into a 1D list of numbers, which is how they are stored on file / in RAM. Indeed in many MRtrix3 commands (including tckgen
), different images don’t even have to be defined on the same image grid: They can have different dimensions / transforms / voxel sizes.