Lin4NeuroをUSBメモリから起動する方法

普段Windowsを使っているけれども、Linuxを使ってみたい。そんな人はある程度いると思います。特に、画像解析をする人は特にそうかもしれません。
そんなとき、3つのオプションがあります。

  1. WindowsにVMware playerやVirtualboxなどの仮想化ソフトをインストールし、その中にLinuxをインストールする。
  2. これはなかなか便利です。私も普段、これで仕事をしています。Lin4Neuroの開発はVMware上で行なっています。何度も試行錯誤がきくからです。具体的な方法はこちらに記載しましたので、そちらを御覧ください。

  3. USBメモリにインストール
  4. これが今から示す方法です。これが便利なのは、自分のPCでなく、手元に転がっているPCで同じ環境を再現できるということです。もしくは、チュートリアルなどで人に何かを伝えたい場合に、自分で環境を準備しておいて、USBメモリを準備することで他の人が全く同一の環境を再現することができます。

  5. Macに乗り換える
  6. Mac OSXはBSDベースで、Bシェルが普通に走ります。これは結構便利で、最近、Macに乗り換えようかどうか真剣に考えています。でも、一つのことに傾倒しすぎるのはどうかなとも思っているので、MacBookProを持ってはいますが、まだメインマシンとはなっていません…。

LinuxをUSBメモリにインストールする方法は知っておくと何かと役に立つことがあります。Windowsのファイルが壊れてしまい、Windowsが立ち上がらなくなった時、LinuxブートのUSBメモリを持っておけば、それから起動してPCから多くのファイルを救出することができます。なので、Lin4Neuroに限ったことではないのですが、便利なのでその起動方法をPDFドキュメントにまとめてみました。下のリンクからどうぞ。

Lin4Neuro_USB.pdfをダウンロード

VMware player上でのLin4Neuroの使い方

画像解析に特化したカスタマイズOSのLin4Neuro。一定の需要があるようで、便利という声をいただいております。
画像解析のためだけにWindowsからLinuxに乗り換えることを躊躇している人も多いと思います。正直、私も画像解析のメインマシンはLinuxですが、日頃の雑多な仕事はまだWindows上で行なっています。Linuxは基本いいのですが、つまずいたときにすぐにトラブルシューティングできるだけの能力がまだないからです。

64bitでメモリもたくさんのっかる世の中、仮想環境がずいぶん充実してきました。Lin4Neuroも仮想環境でけっこういい感じで動きます。めちゃくちゃメモリを使う仕事でなければ、ノートPCに8GBのメモリを載せ、そのうち4GBを仮想に割り当ててそこでLin4Neuroを走らせれば、けっこういい感じで解析ができます。

ということで、VMware player(無償で入手できます)上でのLin4Neuroの動かし方をPDFドキュメントにしてみました。必要な方はダウンロードしてください。

Lin4Neuro_VMwareのダウンロード

Voxel-wise FDR and Topological FDR

In SPM8, voxel-wise FDR was hidden and Topological FDR was introduced. What is Topological FDR? I find some useful notes from SPM8 Release Notes and a post by Tom Nichols to SPM-ML. I quote these two.

SPM8 Release Notes

Topological False Discovery Rate (FDR)

FDR control is an alternative to the more conservative “family-wise error” control for multiple comparisons. Historically, SPM has aimed to control FDR on voxels (the
expected fraction of false-positive/total-positive decisions made about individual voxels in an image). This is now superseded by FDR control of topological properties of the signal (i.e. control of properties that pertain to the spatial organization of activations – e.g. height and extent – and are not reducible to individual voxels). SPM is now able to identify significantly voluminous blobs according to a decision procedure that controls spatial-extent FDR. Thus, on average, the fraction of blobs falsely deemed to have significant spatial extent is controlled beneath say 5/100 = .05 or 1/100 = .01. More recent work is examining FDR control over local maxima.

A post to SPM-ML by Tom Nichols

In SPM8 FDR topological inference was introduced, and voxel-wise FDR inference hidden. Topological inference means inference on peaks and clusters; voxel-wise inference is based on every individual voxel in the image (instead of spatial features of the image). Thus “Topological FDR” means inference on clusters based on cluster size (or local peaks based on peak height), controlling the fraction of false positive clusters among all clusters (or false positive peaks among all peaks) on average, over many experiments.

While topological FDR results may be easier to interpret, in my experience it is is generally not very sensitivity and yields similar results to FWE-corrected inferences.

If you would like to use voxel-wise FDR in SPM8, edit spm_defaults, changing “topoFDR” line to read
defaults.stats.topoFDR = 0;
(quit and re-start SPM to take effect).

References
Chumbley, J., Worsley, K., Flandin, G., & Friston, K. (2010). Topological FDR for neuroimaging. NeuroImage, 49(4), 3057-64. doi: 10.1016/j.neuroimage.2009.10.090.

Chumbley, J. R., & Friston, K. J. (2009). False discovery rate revisited: FDR and topological inference using Gaussian random fields. Neuroimage, 44(1), 62–70. doi: 10.1016/j.neuroimage.2008.05.021.

Files generated in VBM statistics

When you do VBM analysis, you see many files are generated in your stats directory. Suppose you are doing a two sample t-test. You see files like below.

  • beta_0001
  • beta_0002
  • con_0001
  • mask
  • ResMS
  • RPV
  • spmT_001

Ged Ridgway made a clear explanation of these files in NITRC discussion forum. http://www.nitrc.org/forum/message.php?msg_id=6483
It is important to know what these files are, so I quote his post with some modification.

  • beta
  • The estimated linear model parameters at each voxel. In a two-sample design, these are just the two group mean images. beta_0001 is a mean image of group A, and beta_0002 is a mean image of group B.

  • con
  • The contrasts of the parameters. If one makes a contrast of [-1 1], the con_0001 will simply be beta_0002 – beta_0001

  • mask
  • A binary image indicating which voxels were considered in the analysis. If this mask is too small, you may miss the region you are interested in. If too big, it is less likely to survive multiple comparison. So it is worth checking the mask image before you draw some conclusion from your analysis.

  • ResMS
  • The estimated variance (residual mean squares), from which the above-mentioned standard error is derived.
    In more detail, the standard error is proportional to the square root of ResMS and a term that relates to the design matrix X and contrast c as sqrt(c’*pinv(X’*X)*c), which (in two sample t-test) roughly reflects the fact that the standard error is inversely proportional to the number of subjects one has.

  • RPV
  • The resels-per-voxel image related to the smoothness (roughness)
    estimate needed for random field theory.

  • spmT
  • The t-statistic maps formed by dividing the contrast image by its estimated standard error.