Local Optima

Posted in Activity 2 years, 7 months ago

It’s been about four months since I last wrote anything here.

At times your life can reach a state of local optima — you are settled and you begin to get comfortable. If you were to critically analyze the situation, you’d realize that you are at a 7 on a scale of 10 (arbitrarily normalized.) Going any higher would require significant changes and would probably cause a lot of pain. So why do it?

My answer doesn’t matter.

I came across this incredible speech “Man in the Arena” by Theodore Roosevelt in 1910, that never has and never will become irrelevant:

It is not the critic who counts; not the man who points out how the strong man stumbles, or where the doer of deeds could have done them better. The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood; who strives valiantly; who errs, who comes short again and again, because there is no effort without error and shortcoming; but who does actually strive to do the deeds; who knows great enthusiasms, the great devotions; who spends himself in a worthy cause; who at the best knows in the end the triumph of high achievement, and who at the worst, if he fails, at least fails while daring greatly, so that his place shall never be with those cold and timid souls who neither know victory nor defeat.

That is all.

Radial Fields

Posted in Computing 2 years, 11 months ago

For some work I was supposed to do later this term, I wanted a few synthetic vector/tensor fields. Something more complicated than a regular planar field.

I’ve used radial and tangential fields in electromagnetics (think solenoids and inductors) countless times, so it should be trivial to generate one, shouldn’t it? Unfortunately, I was getting mixed up in the minus signs somewhere and for the life of me couldn’t find out where. I checked and rechecked my math. I checked the usage of atan2(3) instead of atan(3). Finally, I had to resort to generating them by rotating the Cartesian basis and regenerating the tensors from the spectral components. Hacky, cludgy and doesn’t follow the DRY principle but this is just a test case. Yay tangential field:

tensor.png

To check the robustness of my algorithms later on, I need to add some noise to the fields and see how well they perform. Plagued by partial volume effects, diffusion tensor data are inherently very noisy, so it’ll be good to include noise as part of the algorithm development process. Right now, modeling noise in tensors is a very complicated process because the tensors themselves are built through a linear regression from diffusion weighted images. The noise is definitely not gaussian. Gaussian noise is easy, and that’s what I’m doing now until I fully understand how noise is transformed through the regression.

Another matter of complication is that regularizing (or denoising/smoothing) these fields is an active area of research. Extensions to the standard anisotropic edge-preserving filters like Perona-Malik are non-trivial (at least to me.) One of the technicalities of diffusion tensors is that they are positive definite. The positive definiteness is a physical manifestation as diffusion can only be zero at absolute zero (a great story for sci-fi.) I picked one of the many extensions just to test my workflow and here are the results. Pretty good I’d say for all the complications.

tensor15.png tensor15s.png

Lastly, opensource visualization tools seem to trip over the simplest of tasks. MayaVi seems to be the only one that can update the VTK pipeline when the source data changes. In other programs I have to rebuild the pipeline each time. As you can imagine, this gets tiring really fast.

MayaVi tensor visualization

Mathematical Image Analysis

Posted in Activity, Design 2 years, 11 months ago

I’m taking just one course this semester — a special topics course on Computational Anatomy and Medical Image Analysis. The course is highly focused on the research interests of my supervisor, so instead of sitting beside each other in the lab, we go to another class room and sit beside each other.

Computational Anatomy is “the use of mathematical analysis to learn how tissues grow, assume new shapes and morph into mature structures.” The first few classes are review of the pre-requisites – linear systems theory and stochastic systems. Having not taken either of these courses, I’m seeing plenty of new material. A lot of it is intuitive, some of it not obvious at all. Overall a Good Thing.

I don’t have a copy of the outline yet, but some of the topics we are going to cover are vector space theory, variational calculus, differential and riemannian geometry, tensor analysis and applications in Computational Anatomy. An example of an application is what I’ve just finished writing — linear statistical analysis to classify the hippocampus in dementia of the Alzheimer’s type.

I’ll be posting about things that I find interesting here. If you’re in the class and want to follow along, a quick way to do so if by bookmarking the tag: ensc462.