Hello,
I've just run my first successful MC simulation on a subject's T1 MRI. The output makes a lot of sense given their underlying anatomy. I am curious about, if i want to report the results, how can I access specific sensitivity values (absorption change [mm-1]) for specific channels? even when i look at the sensitivity of a specific channel, the only quantitative aspect of the output that i see is from the colorful scale on the right hand side, which isn't actually that specific. the increments on mine are -2, -1.5, 1, 0.5, 0. How can I determine the specific value for a channel whose absorption change appears to (based on its color) fall between two of the values on the color scale? thank you in advance!
I have a partial answer for you that I want to document here for your benefit and others. There is more that can be done that I will describe, but I haven't figured out the final steps... but hopefully we will collectively figure it out and post here for others to find.
First, you can load the sensitivity matrix into matlab. The file is in the 'fw' sub-directory and is called 'Adot.mat'. Load that. It will have dimensions # channels x # brain surface vertices x # wavelengths. Look at the row of data for your desired channel and wavelength and you get the numeric values for the sensitivity to each and every vertex. To remind yourself which row corresponds to which channel, you need to look at the order of the channels in the measurement list that is contained in the snirf file.
Now, it is possible to visualize the sensitivity on the brain surface using the matlab trisurf() command. Do do this, you first need to load the mesh for the brain surface. You can find the colin mesh in AtlasViewer/Data/Colin/anatomical/pialsurf.mesh and load it with the [v,f]=read_surf() function that is from freesurfer but copied into your AtlasViewer path. You can then visualize it with trisurf(f,v(:,1),v(:,2),v(:,3),squeeze(Adot(1,:,1))). You just have to make sure that the number of vertices in Adot matches that number of vertices in v (or maybe it is the number of faces). When we run the monte carlo, we do give the user the option to decimate the number of vertices. I forget where that mesh is saved. I have a feeling it is saved in AtlasViewer.mat if you manually saved it with the file menu option to save the AtlasViewer state.
Does this help you at all?
Try to manually save the atlasviewer state in the file menu.
Then you can load atlasViewer.mat into matlab. You can then find the reduced mesh in fwmodel.mesh. This will ahve the same saize as Adot
confirm that and then we can figure out the matlab commands to display Adot color coded on the pial mesh
The following code worked nicely for me. You can play around with the code to get a better visualization and lighting.
load atlasViewer.mat load fw/Adot.mat f=fwmodel.mesh.faces; v=fwmodel.mesh.vertices; %% figure(1); h=trisurf(f,v(:,1),v(:,2),v(:,3),Adot(10,:,1)); set(h,'linestyle','none') lighting gouraud light %% nopt = size(probe.optpos_reg,1); nsrc = size(probe.srcpos,1); ndet = size(probe.detpos,1); hold on for ii=1:nopt hopt = plot3( probe.optpos_reg(ii,1), probe.optpos_reg(ii,2), probe.optpos_reg(ii,3), '.'); set(hopt,'markersize',20) if ii<=nsrc set(hopt,'color','r') else set(hopt,'color','c') end end hold off
The development branch of AtlasViewer has now been updated to save mesh_brain.mat and mesh_scalp.mat in the 'fw' sub-directory along with Adot.mat. This will have the mesh that is matched to Adot annd you don't need to save the atlasviewer state.