Start and end points of tractography

Hi,

Attached is mask I have tried to create of the cortex part only, Its got a few other parts too I know. It is a sheep brain. My aim was to create fibres that go through the subplate (the black region). As this mask captures the outline of the subplate well. So I want to use this mask as the starting and end point of my tractography. Can someone suggest to me how to do this?
Also when running the dwi2fod spherical deconv command, do I enter the whole brain mask, or the mask attached in this picture.

Cheers

PS I think I know the right answer, but I am not sure.

I am thinking seed_image should be the mask shown above, and the -include option should be the whole brain mask for the tckgen command

If someone could correct me if i am right or wrong would be great.

Actually, it strikes me that what you want to do is to split up your mask so as to have one mask image for the cortex, and separate one for the ventricular zone (presumably?). You can then specify one as seed, the other as target. Or go for a whole-brain approach and use tckedit or tck2connectome to extract out those that connect to both. There’s a lot of ways to do this, ultimately it’ll depend on exactly what it is you’re trying to achieve, how you plan on quantifying your results, etc. The best thing at this stage may just be to experiment with the ideas above, see whether you get something sensible…

So you are suggesting I have 2 masks, instead of one? how would the dwi2fod command go??

Tbh the ventricles (middle area) only got caught up because I couldnt find a way to auto segment the cortex only (I used itk snap). Yeh segmenting is an issue an itself but thats a topic for another time. I just wan to run some tractography from the cortex to the inner ventricle thingy, so I can see the tracts going through the subplate.

How would tckedit work anyway in this case when you say extract out those that connect to both. Do I use the include or exclude command?

was there anything wrong with what i suggested in post 2? This is the result I got using that. As long as I can capture the subplate…

I guess if you all you’re interested in are the fibres within the subplate, your approach would be fine. I was assuming you were interested in fibres specifically connecting cortical to ventricular regions… In which case you’d use one ROI as the seed region, and the other as the include region.

However, you clearly still have issues with your gradient directions. Have you tried inverting the z-axis as we discussed a while back…?

As far as dwi2fod goes, you should use a brain mask for that - or no mask if you don’t mind the longer runtime. The mask for dwi2fod is just to restrict the computation to the brain to speed things up, it’s not actually a requirement. The masks you use for tractography are there to specify regions of interest, and as such have nothing to do with the mask used in dwi2fod

What do you mean by that? Whats the difference between my case and the case you mentioned? For e.g you say fibres conencting cortex to ventricular regions, but wouldnt that include subplate fibres as well? So its like the same thing, the subplate fibres will be included in the tractography if I connect the cortex to the ventricle because the subplate is in the way? or am i way off?

There’s a difference between tracking all fibres in the subplate, and tracking only those that connect between the cortex and the ventricular zone - at least in principle, you can have fibres in the subplate that don’t connect from one ROI to the other. So the ‘correct’ approach is very much dependent on what specific question you’re trying to ask of the data. I wouldn’t be so sure that what you’ve done is necessarily ‘correct’ - I have no idea what your aims are for your project. It’s very likely that other approaches would be better. But this is something that you’d need to research and think about a bit more. There’s tons of literature and review articles out there that would at least give you a flavour of what can be done and what might be appropriate in your particular circumstances.

But like I said, your first priority is to get your data fixed up. You need to sort out your directions…

Just a couple of fundamental question

a) Yeh… like you were saying, the gradients, is there a really easy way to spot what dimension needs to be fixed? You told me before but I am having trouble applying it in general. I realise you said the file is wrong, but the person supplied me with the file is not contactable atm. So I am going to make do.

b) If i wanted to track all the fibres within the subplate what would I need to do? Would I need to give like that mask shown below (in 3D) as the seed? What would that do?

Regards

Also when running the dwi2fod spherical deconv command, do I enter the whole brain mask, or the mask attached in this picture.

So you are suggesting I have 2 masks, instead of one? how would the dwi2fod command go??

The mask used for the dwi2fod command specifies which voxels the CSD algorithm is applied to, and which voxels will contain a zero FOD. So this should be a mask of the entire brain, regardless of any masks that may be subsequently used for tractography. If you were to use these masks as the input to dwi2fod, it would be impossible to track between the two areas, since there would be no fibre orientation estimates in the space between them.

So I want to use this mask as the starting and end point of my tractography.

This is slightly difficult to apply, either using seed / include regions in tckgen or include regions in tckedit. For instance, consider the former (tckgen) case, where this ROI is provided both as the seed image and an inclusion mask. When a streamline seed point is determined, the algorithm immediately checks this point against any include regions, and determines straight away that the streamline has ‘traversed’ the include region. Therefore the streamline would then be free to propagate anywhere in the brain, and would be ‘accepted’ and written to the output file as it has successfully traversed all include regions.

It is more typical in targeted tracking experiments to use one ROI as the seed region, and another ROI as an include region, thereby requiring that streamlines must traverse from the first region into the second.

… and the -include option should be the whole brain mask for the tckgen command

This would have no effect. Include regions (either in tckgen or tckedit) are used simply as filter mechanisms, to remove any streamline that fails to traverse all include regions. If you provided a whole-brain mask as an include region, it is (just about) guaranteed that all streamlines will possess at least one point that lies within this mask, and therefore such an include region would not perform any selective inclusion / removal of streamlines. It is more typical to provide a whole-brain mask image to tckgen using the -mask option, which terminates any streamline that attempts to propagate outside the ROI.

I just wan to run some tractography from the cortex to the inner ventricle thingy

I think this is probably the clearest indication of the experiment you’re trying to do. Since you want to track from the cortex, your seed ROI should contain cortex only. You want all tracks to go to ‘the inner ventricle thingy’: therefore only this region should be provided as an include ROI, so that any track that fails to traverse it will not be included in the output track file. But remember: If your include region also includes cortex, then any streamline seeded in the cortex would immediately be determined to have successfully reached this include region, and therefore this constraint would not be applied as you had intended.

a) Yeh… like you were saying, the gradients, is there a really easy way to spot what dimension needs to be fixed?

If you are interested, you can try checking out the dwigradcheck branch in Git, and running the dwigradcheck script on your DWI. It’s still in development, but the goal is to provide an automated way of estimating errors in the diffusion gradient table, and provide the appropriately corrected table if requested.