[Camino-users] New commands, conmat and cbsmat

Ian Malone i.malone at ucl.ac.uk
Fri Aug 17 03:02:21 PDT 2012


Hi,

Thanks for this. I'd modified procstreamlines to add something similar 
for my own use and have some questions as a result. Per-tract does the 
connectivity map measure the first regions encountered going outwards 
from the seed point or does it count all regions connected by a tract? 
If the later do you do anything about self connections (loops out and 
back into a region)? If the former then I guess seed points within a ROI 
register as a connection to the first ROI encountered in both 
directions? Or are there options for some different behaviours?

Best wishes,
Ian

Philip A Cook wrote:
> Hi all,
>
> Addressing the longstanding need to replace the broken conmap, I've made a start on this with two new commands, conmat and cbsmat.
>
> conmat gives you pairwise connectivity matrices. If you have a collection of streamlines and a target image with N labels, conmat gives you a NxN symmetrix matrix C where C(i,j) is the number of streamlines connecting target i to j. You can also get the mean FA / ADC etc along the lines connecting i to j, or the mean length of lines connecting two regions.
>
> It doesn't produce the figure that the old conmap did, but I have made something similar using R's igraph package
>
> library(igraph)
> conmat = read.csv("conmat_sc.csv")
> g = graph.adjacency(conmat)
> V(g)$label <- V(g)$name
> E(g)$width = E(g)$weight / 500
> lay <- lapply(list(g), layout.fruchterman.reingold, niter=3000)
> plot(g, layout = lay[[1]], vertex.shape = "rectangle", vertex.size = 40, vertex.size2 = 8, vertex.label.cex = 0.5, vertex.color=rep.int(c(2,3), 16) )
>
> It should also address some of the problems with conmap. It should work with any 32-bit integer labels, including those that are not labeled 1...N, without producing massive matrices with entries for non-existent labels. 
>
>
> cbsmat is related but specifically designed for the use case where we have a set of seed points and want to produce connectivity information for each seed. It's similar to what you might get with procstreamlines and targetprops2txt, except that you don't need to go through the intermediate step of creating target images for each seed point.
>
> One major difference in cbsmat is that all streamlines from a seed point are processed together, without regard to multiple PDs in the seed voxel. This is done to avoid having to count streamlines from the each seed point. The advantage of this is that you can pre-process the streamlines as many times as you like with procstreamlines before making the matrix.
>
> The procstreamlines way of dealing with multiple PDs was to make one connectivity image for each PD, and then leave it to the user to order and / or combine them for later processing. I'm not sure how helpful this was because I don't know if there is a useful way of combining this information beyond just reporting all possible connections as cbsmat does. This functionality could be added back if we update the streamline file format to include a PD index. This would take some work but it could be done. 
>
>
>
> Phil
>
>
> _______________________________________________
> Camino-users mailing list
> Camino-users at www.nitrc.org
> http://www.nitrc.org/mailman/listinfo/camino-users
>
>   




More information about the Camino-users mailing list