[Homer-users] AtlasViewer

David Boas dboas at nmr.mgh.harvard.edu
Tue Sep 10 21:57:03 EDT 2013
Search archives:

Hi Theresa,
Excellent catches!

Setting the default channel to [0 0] is a great solution. I have made 
this change in initSensitivity.m and committed the change to CVS.

The NaN problem is most likely a result of the Rytov normalization that 
is done in forming the sensitivity matrix. The Rytov formulation divides 
the 3pt Green's function by the detected fluence. If for some reason no 
photons were detected in the Monte Carlo simulation (i.e. photons 
reached the detector from the source and vice versa) then we will get a 
divide by zero which gives a NaN. I have put a check in 
genSensitivityProfile.m to not divide by zero and just set the solution 
to 0 instead. In this way, the corrupt channel won't mess up the [0 0] 
summed sensitivity profile. I hope this solves the problem.

The other possibility is that photons were not launched into the tissue 
by either a given source or detector. This shouldn't happen provided 
your push the button that say "register probe to surface" before 
creating the monte carlo batch file, as this will align the sources and 
detectors onto the surface such that photons are launched into the 
tissue. In any case, I also added a check into genSensitivityProfile.m 
to check if this divide by zero problem occurs. If it does, it sets the 
fluence to 0 to get rid of the NaN and not impact the summed sensitivity 
profile.

I print out a warning in both cases to identify the problem so you can 
let me know if the latter happens.

If the former happens, then either you can ignore it or run more 
photons. The default is to run 1e6 (1 million) photons. This is actually 
not enough to get a stable solution. That is, with only 1e6 photons, 
your statistics will be very noisy for the fluence of light within the 
tissue. This is probably okay for qualitative checks of sensitivity 
profiles. I hate to say it, but we run 1e8 photons when we are producing 
results for publications (or even 1e9!). This will take 100x longer!!!

Fortunately there is an alternative. We can use Qianqian Fang's MCX 
which performs the Monte Carlo on the GPU rather than the CPU. And this 
can be 100x faster or even faster. So, in the end, it will take the same 
amount of time. The only challenge is that you have to install MCX 
separately. You can find it at
     http://mcx.sourceforge.net/cgi-bin/index.cgi
We do have to modify AtlasViewer to create a batch file that will launch 
MCX instead of tMCimg though. So let me know when you have MCX working, 
and we can update AtlasViewer to create the batch file to use MCX.

Thanks for making such great progress and clearly describing these issues.

David


On 9/10/13 5:47 PM, Moulton, Theresa (NIH/CC/RMD) [F] wrote:
> Hello Homer users,
>
> Many thanks to David for the helpful tutorials and beneficial features of AtlasViewer.
>
> One problem that I was having initially was that after running the Monte Carlo simulations and generating the sensitivity profiles in AtlasViewer, they were not being displayed. I figured out that it was because my probe design did not include a connection between source 1 and detector 1 (the default S-D pair), so in the displaySensitivity.m was returning early and not enabling the text box to change channels. Updating the sensitivity.Ch value in initSensitivity.m solved this problem for me. Although I've been looking at this issue from my limited viewpoint, it appears that setting the default to [0 0] could be a solution to work for any probe design.
>
> I was hoping to also ask for some feedback from the group. I'm having another problem with either the Monte Carlo simulations outside of Matlab or the genSensitivityProfile.m function, and I was wondering if anyone in the user group might have some advice... In 2 probe designs that I've tried so far, I have found one or more channels where the generated sensitivity profiles (Adot and sensitivity.Adot) returns NaN. I can individually see the profiles of all other channels in AtlasViewer, but no sensitivity is displayed for those with a Nan value (makes sense), and setting the channel to [0 0] as shown in the tutorial will also not display anything since having NaN in the sum returns NaN throughout. In one probe design this is a short-separation (1 cm) channel, but in the other probe it is a longer separation of 3 cm. Has anyone seen this before, or have a suggestion for the source of this problem?
>
> Thanks in advance,
> Theresa
>
>
> Theresa Sukal Moulton, DPT, PhD
> Post-doctoral Fellow
> Functional & Applied Biomechanics Section
> Rehabilitation Medicine Department
> National Institutes of Health Clinical Center
>
>
> -----Original Message-----
> From: David Boas [mailto:dboas at nmr.mgh.harvard.edu]
> Sent: Saturday, August 31, 2013 12:21 PM
> To: homer-users at nmr.mgh.harvard.edu
> Subject: [Homer-users] AtlasViewer
>
> I've posted some new tutorials to show how to register digitized points to an atlas in AtlasViewer and then how to run the Monte Carlo forward model to calculate the measurement sensitivity profiles. You can see these tutorials at http://homer-fnirs.org/documentation/
>
> You can also find links to download the files so that you can duplicate what is shown in the tutorials.
>
> Make sure you have the latest developers version of homer to run AtlasViewer. We are trying to create an executable of AtlasViewer for those who don't have matlab.
>
> Let me know what else you need tutorials on for AtlasViewer and I will try to make a video.
>
> David
>
> _______________________________________________
> Homer-users mailing list
> Homer-users at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/homer-users
>
>
> The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
>
>
> _______________________________________________
> Homer-users mailing list
> Homer-users at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/homer-users
>
>






More information about the Homer-users mailing list