• 沒有找到結果。

CHAPTER 3 MORPHING

3.5 Result

3.5.3 Bad result

下列圖為使用interpolation的方法。在特定的區域中,影像會有浮動、被擠 壓、不自然的變形,如圖中紅色方框內即為此。

圖 3-40:Bad image1

圖 3-41:Bad image2

第四章 Template brain

 4.1:Introduction of affine transformation

Affine主要包含了rotation、translation、scaling與shearing這些矩陣的轉換,

因此定義如下[12]:

其中: p = [ 𝑝1 𝑝2 … 𝑝12 ]T,p 代入 M 即為affine transformation s’為經過轉換後的點。(target model)

s為原始的點。(original target model)

M即為上述轉換矩陣後的乘積。接著我們可以定義target model與reference model的距離:

 4.2:Introduction of nonrigid transformation

主要是利用RBF(Radius basis function),分佈於d個維度,對應的function為T(x ),

其中k = 1,…,d,表示如下:

T(𝑥 ) = [ 𝑓1(𝑥 ) , … , 𝑓𝑘(𝑥 ) , … , 𝑓𝑑(𝑥 ) ] RBF的function主要由兩個部份組合而成:

 Global:根據control point影響的是全域的影像。其數學式如下:

𝑃𝑚𝑘 𝑥

 Local:根據control point影響的是區域的影像。其數學式如下:

𝑤𝑖𝑘𝘨 𝑟𝑖

在此將RBF用於三維(d = 3)的生物醫學影像,因此𝑃𝑚𝑘多項式為線性(m = 1),

在reference image的第j個control point。

此聯立方程式有n+4個變數,由於上述只有n個線性方程式,因此需要加入額

 4.3:Template brain

首先,利用 affine、mask、nonrigid 操作一組檔案的 warp 動作。

在 affine 的部份,先選擇 reference file(R)與 target file(T),下圖所選取的檔案。

圖 4-1:reference file與target file

 利用 affine,選擇檔案(T)與(R)並且設定 Degree of freedom(DOF)為 7,產 生的結果為(aT)。

 利用 affine,選擇檔案(aT)與(R)並且設定 Degree of freedom(DOF)為 12,

產生的結果為(aaT)。如下圖所示。

圖 4-2:一次affine與二次affine

 接著把reference(R)取mask,得到feature mask(fR)。

 最後nonrigid的設定:

一、 Test image :二次affine後的結果(aaT)。

二、 Reference image :reference file(R)。

三、 Feature mask :mask後的結果(fR)。

執行後,下圖為最後warp的結果。

圖 4-3:原始檔與warp後的結果

上述即為一組 warp 的過程。接著將 42 組果蠅腦相互 warp 後,會得到總共 42×41= 1722 組的結果。檢查產生後的結果,去除不理想的影像及原始果蠅腦有 不完整的影像,有 8 組。因此被我們所參考的果蠅腦總共有 34 組。接著考慮這 34 組相互 warp 後產生的 x、y、z 方向的 deformation field。每一組腦都有其它 33 組 warp 後的 deformation 並算出位移量將其累加,即為總位移量的值。接著 為了使得 warp 後位移量為最小,因而取出這 34 組裡最小的總位移量,我們把這 個腦當作暫時的標準腦。

而後,再把其它33組腦分別warp到暫時的標準腦,因此會產生33組的結果,

最後我們再把這33組作平均,即為最後的標準腦(template brain)。

Template brain flow chart:

圖 4-4:標準腦的建立流程

開始

輸入42組果蠅腦作為建立標準腦用的參考

將42組果蠅腦交互warp,得到每一個 x、

y、z 方向的 deformation

移除誤差較大及結果不理想的果蠅腦

由 x、y、z 方向的 deformation,計算warp 後的移動向量

記錄每一組的移動向量,並且加總每一組 腦所有移動向量的值

選取一組最小移動向量 的果蠅腦當參考

將其它所有果蠅腦 warp 到符合上述條件的 果蠅腦

warp 後的結果全部加總並且作平均的 動作,此平均腦即為標準腦

結束

 4.4:Neuron warp

接著我們需將神經 warp 到標準腦中。在 warp 過程中,由於一次無法處理 兩個 channel 也無法單獨處理神經的 warp,因此需要對果蠅腦做前處理。

首先,對其中任意擁有兩個 channel 的果蠅腦分成兩個各包含一個 channel 的檔案,接著我們把結構(T)warp 到標準腦中。在 warp 過程中,affine 會產生一 個轉換的矩陣(M),二次 affine 也會產生一個轉換矩陣(aM),最後處理 nonrigid 也會產生一個 x、y、z 方向的 deformation(xd、yd、zd)。

再來,神經(N)的 warp 即利用這些轉換的矩陣來操作。

 利用 applyaff,神經經由轉換矩陣(M)產生第一次 affine 後的結果(aN)。

 利用 applyaff,第一次的結果(aN)經由轉換矩陣(aM)產生第二次 affine 的結果(aaN)。

 利用 applydef,把第二次的結果(aaN)由 x、y、z 方向的 deformation(xd、

yd、zd)產生結果,即為最後 warp 的處理。

如下圖所示,紅色方格即為果蠅腦大小。

圖 4-5:原始神經與warp後的結果

 4.5:Result

 4.5.1:Affine

下列為其中兩組果蠅腦相互 warp 的結果。

檔案名稱 維度大小 Bounding Point1 Bounding Point2 Ellipsoid Body

F_antidlg_20mb_12 512x512x60 ( 42,155,2 ) ( 455,369,57 ) ( 255,214,24 )

F_antidlg_20mb_06 512x512x60 ( 26,113,1 ) ( 503,366,52 ) ( 261,217,25 )

圖 4-6 檔案編號 12 與 6

圖 4-7 檔案編號 6 warp 至 12 與 12 warp 至 6

下列為其中兩組果蠅腦相互 warp 的結果。

檔案名稱 維度大小 Bounding Point1 Bounding Point2 Ellipsoid Body

F_antidlg_20mb_34 512x512x69 ( 62,128,5 ) ( 462,347,62 ) ( 254,208,28 )

F_antidlg_20mb_41 512x512x64 ( 9,122,4 ) ( 493,376,60 ) ( 246,209,25 )

圖 4-8 檔案編號 34 與 41

 4.5.2:Template brain

要建立標準腦,做為往後所有果蠅腦的參考,因此我們需要參考的果蠅腦資 訊量不能過少。下表為 34 組果蠅腦的資訊。

檔案名稱 維度大小 Bounding Point1 Bounding Point2 Ellipsoid Body

F_antidlg_20mb_06 512x512x60 ( 26,113,1 ) ( 503,366,52 ) ( 261,217,25 )

F_antidlg_20mb_08 512x512x55 ( 23,143,1 ) ( 508,384,54 ) ( 257,211,24 )

F_antidlg_20mb_09 512x512x60 ( 16,128,1 ) ( 477,352,60 ) ( 257,210,23 )

F_antidlg_20mb_11 512x512x65 ( 19,163,5 ) ( 475,377,62 ) ( 256,208,26 )

F_antidlg_20mb_12 512x512x60 ( 42,155,2 ) ( 455,369,57 ) ( 255,214,24 )

F_antidlg_20mb_13 512x512x61 ( 45,142,2 ) ( 463,347,59 ) ( 254,212,25 )

F_antidlg_20mb_14 512x512x67 ( 52,141,6 ) ( 435,348,61 ) ( 259,214,24 )

F_antidlg_20mb_15 512x512x70 ( 44,158,6 ) ( 473,369,59 ) ( 263,219,27 )

F_antidlg_20mb_16 512x512x68 ( 0,136,3 ) ( 494,371,64 ) ( 262,211,25 )

F_antidlg_20mb_18 512x512x65 ( 10,145,1 ) ( 489,374,62 ) ( 261,208,27 )

F_antidlg_20mb_19 512x512x70 ( 27,126,6 ) ( 485,372,65 ) ( 255,217,27 )

F_antidlg_20mb_20 512x512x66 ( 28,128,3 ) ( 489,355,62 ) ( 256,222,25 )

F_antidlg_20mb_21 512x512x77 ( 21,139,3 ) ( 483,349,67 ) ( 259,218,29 )

F_antidlg_20mb_22 512x512x75 ( 26,132,7 ) ( 485,480,38 ) ( 255,204,33 )

F_antidlg_20mb_23 512x512x70 ( 45,120,7 ) ( 456,404,65 ) ( 252,204,29 )

F_antidlg_20mb_24 512x512x66 ( 23,112,6 ) ( 505,359,64 ) ( 262,207,26 )

F_antidlg_20mb_25 512x512x67 ( 17,105,5 ) ( 493,345,62 ) ( 260,206,25 )

F_antidlg_20mb_26 512x512x63 ( 14,137,4 ) ( 431,354,60 ) ( 261,212,24 )

F_antidlg_20mb_27 512x512x69 ( 3,110,6 ) ( 462,348,65 ) ( 258,208,29 )

F_antidlg_20mb_28 512x512x70 ( 36,115,7 ) ( 479,360,66 ) ( 258,206,26 )

F_antidlg_20mb_29 512x512x65 ( 14,128,3 ) ( 479,367,62 ) ( 262,208,27 )

F_antidlg_20mb_30 512x512x72 ( 14,116,6 ) ( 495,364,66 ) ( 265,207,27 )

F_antidlg_20mb_31 512x512x70 ( 39,109,3 ) ( 480,1344,62 ) ( 263,209,26 )

F_antidlg_20mb_32 512x512x64 ( 34,128,2 ) ( 459,362,57 ) ( 253,203,24 )

F_antidlg_20mb_33 512x512x65 ( 27,125,7 ) ( 470,367,61 ) ( 253,206,25 )

F_antidlg_20mb_34 512x512x69 ( 62,128,5 ) ( 462,347,62 ) ( 254,208,28 )

F_antidlg_20mb_35 512x512x70 ( 21,117,6 ) ( 481,345,65 ) ( 253,219,25 )

F_antidlg_20mb_36 512x512x68 ( 51,148,6 ) ( 472,382,62 ) ( 252,213,27 )

F_antidlg_20mb_37 512x512x62 ( 49,120,5 ) ( 494,344,58 ) ( 255,207,25 )

F_antidlg_20mb_38 512x512x61 ( 10,148,3 ) ( 503,371,57 ) ( 254,217,23 )

F_antidlg_20mb_39 512x512x64 ( 29,137,4 ) ( 466,363,58 ) ( 247,207,26 )

F_antidlg_20mb_40 512x512x61 ( 0,113,3 ) ( 508,376,58 ) ( 257,205,25 )

F_antidlg_20mb_41 512x512x64 ( 9,122,4 ) ( 493,376,60 ) ( 246,209,25 )

F_antidlg_20mb_42 512x512x65 ( 0,118,4 ) ( 506,366,61 ) ( 258,208,26 )

圖 4-10:三十四組果蠅腦的資訊

在 Template brain 的實驗中,我們需要找出一個最小 deformation field 的果 蠅腦。實驗結果得到編號十四號的腦符合上述條件,而後會將其它的腦 warp 到 十四號腦接著取平均變成 Template brain,下列為此 Template brain 的資訊。

檔案名稱 維度大小 Bounding Point1 Bounding Point2 Ellipsoid Body

Template Brain 512x512x67 ( 57,139,8 ) ( 459,368,66 ) ( 260,216,26 )

圖 4-11 標準果蠅腦的資訊

下圖為 Template brain 的其中四張影像:

圖 4-12:Template brain

 4.5.3:Neuron warp

此實驗資料的原始果蠅腦為兩個 channel 檔案,在此我們需把兩個 channel 的資料分成兩個各一個 channel 的檔案。其中取出果蠅腦神經的 channel 來做 neuron warp,主要目地是要將 neuron warp 到果蠅的標準腦裡。下表為四組包含 果蠅腦組織與神經的資訊。

由於神經的部份在影像區域較小且不明顯,因此經由染色後較方便觀看,下 列為四組果蠅腦神經組織 warp 至 template 中,紅色外框表示其 bounding box 大 小:

檔案名稱 維度大小 Bounding Point1 Bounding Point2 Ellipsoid Body

Or83bdlg1200 512x512x84 ( 16,105,5 ) (508,392,73 ) ( 258,216,43 )

Template Brain 512x512x67 ( 57,139,8 ) ( 459,368,66 ) ( 260,216,26 )

圖 4-13:檔案編號 1200 warp 至 template

檔案名稱 維度大小 Bounding Point1 Bounding Point2 Ellipsoid Body

Or83bdlg1500 512x512x67 ( 19,136,4 ) ( 486,369,63 ) ( 259,216,26 )

Template Brain 512x512x67 ( 57,139,8 ) ( 459,368,66 ) ( 260,216,26 )

圖 4-14:檔案編號 1500 warp 至 template

檔案名稱 維度大小 Bounding Point1 Bounding Point2 Ellipsoid Body

Or83bdlg12001 512x512x87 ( 36,128,5 ) ( 485,368,76 ) ( 253,208,40 )

Template Brain 512x512x67 ( 57,139,8 ) ( 459,368,66 ) ( 260,216,26 )

圖 4-15:檔案編號 12001 warp 至 template

檔案名稱 維度大小 Bounding Point1 Bounding Point2 Ellipsoid Body

Or83bdlg12002 512x512x81 ( 31,145,3 ) ( 487,366,70 ) ( 259,206,36 )

Template Brain 512x512x67 ( 57,139,8 ) ( 459,368,66 ) ( 260,216,26 )

圖 4-16:檔案編號 12002 warp 至 template

下列為其中四組果蠅腦神經同時放入 template,包含五個 channel:

 紅色部份,即為 template brain。

 其於部份,即為四組 neuron。

圖 4-18: Four neuron and template brain

第五章 User interface for QT

 5.1:QT introduction

QT 是一個跨平台的應用程式架構,由 Havard Nord 和 Eirik Chambe-Engm 於 1994 年開發完成並創立 QT 軟體公司,為完全物件導向設計,易於擴充並且允許 元件開發,可以開發一般應用程式以及使用者介面(GUI),並且能夠很快速地部 署於各種不同的桌面與嵌入式作業系統中,如圖 2.14,可以發現 QT 支援 C++與 Java ,並 且於 跨 平台支 援 包含 以下 作業 系統 : Microsoft Windows, Mac OS, Linux/X11, Embedded Linux 等。

圖 5-1:QT 開發架構

在使用者介面(GUI)程式開發上,QT 利用訊號與槽(signal/slot)機制取代傳統 的 callback 來連結物件之間的溝通。所以當操作事件發生時,物件會發出一個訊 號,而槽(slot)為一個函式(function)即可以接受特定訊號並且執行本身設定的動作,

而訊號與槽則透過靜態的方式來連結(connect)。

為了使得制定果蠅標準腦的操作使用容易,因此我們利用QT設定出一個簡 易使用者介面(GUI),主要的內容包含:

 Affine:處理全域性的影像轉換

 Fmask:處理對果蠅腦取 mask

 Nonrigid:處理 RBFs 的區域性部份

 Applyaff:對一果蠅腦進行任意一矩陣的乘積

 Applydef:對一果蠅腦進行所有 voxel 的 deformation

 5.2:User interface for QT

本節為利用 QT 開發環境的使用者介面(UI)。

下圖表示讀取副檔名為.ipt、.hdr、.img 的影像及影像部份 detail 的資訊量。

圖 5-2:讀取副檔名為.ipt、.hdr、.img 的檔案

下圖為處理 applyaff,applydef 等部份。

圖 5-3:處理 warp 的相關檔案

下圖為處理 affine 與 mask 的部份。Affine 的部份內容包含 reference 與 target 檔案的選取、參數的設定與選項的勾選。Mask 的部份包含 reference 檔案的選取、

mask 是否選定與參數的設定。

圖 5-4:處理 affine 與 mask 的部份

下列為處理 nonrigid 的部份,包含經由 affine 後 reference 檔案的選取、target 檔案的選取、由 mask 後 mask 檔案的選取、參數的設定、寫出檔案的型式、大 小,與最後選項的勾選。

圖 5-5:處理 nonrigid 的部份

第六章 Conclusion

下列為實驗過程中所使用的環境:

 作業系統:Microsoft windows XP3

 開發環境:Visual studio 2005 + QT + CGAL

 CPU 時脈:Intel(R) Core(TM)2 Duo CPU E8400 3.0 GHz

 顯示卡 :nVIDIA GeForce 9800GTX

 記憶體 :3GB

在我們的實驗中,利用 interpolation 的方法進行 warp,其優勢在於不管影像 檔包含有多少個 channel 都可以一次的 warp 完成,並且除了影像中的某特定區 域外,其它部份的對位都很精準。而其缺點排除人為主觀的設定特徵點與三角化 的過程之外,對於 warp 後 ellipsoid body 與 antennal lobe 的部份,其附近影像有 浮動的感覺,使結果不盡理想。又因處理過程使用到遞迴,處理時間些微壟長。

為了 warp 使用上的便利,我們建立一組簡單的 user interface(UI),其中包含 處理 warp 的所有功能。技術純熟後,未來可逐漸地將此介面擴增其功能。

此外,若能把 warp 的結果、標準腦與 volume rendering 結合,就可以 3D 的結構 形式來做比較觀察,讓研究者更能清楚的看出 image 間的差異與細節的部份。在 網路的應用上,將此系統加上資料庫與網路應用,建立 Web Server 供使用者能 夠線上查詢、觀看,以 Volume Rendering 展現結果,讓系統應用更廣更完善。

Reference

[1] L. Gabriele, Volumetric Image Analysis, chapter 3 ,pp. 53-59, Wiley, May 1998.

[2] F. A. Sadjadi, E. L Hall, “Three-dimensional moment invariants”, IEEE Transactions on Visualization and Computer Graphics, Vol.2, no.2, pp. 127-136, March 1980.

[3] T. L. Faber, E. M. Stokely, “Orientation of 3-D Structures in Medical Images”, IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol.10, no.5, pp.

626-632, September 1988.

[4] 劉佳昇,「Coordinate System and Warp for Drosophila Brain」,國立交通大學,

多媒體工程研究所碩士論文,民國 97 年 9 月

[5] V. B. Le, D. T. Lee, “Out-of-Roundness Problem Revisited”, IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol.13, no.3, pp. 217-223, March 1991.

[6] P. K. Agarwal, B. Aronov, S. Har-Peled, M. Sharir, “Approximation and Exact Algorithms for Minimum-Width Annuli and Shells”, Annual Symposium on Computational Geometry. Proceedings of the fifteenth annual symposium on Computational geometry, pp. 380-389, Miami Beach, Florida, United States, 1999

[7] B. Gartner, S. Schonherr, “An Efficient, Exact, and Generic Quadratic Programming Solver for Geometric Optimization”, Annual Symposium on Computational Geometry. Proceedings of the sixteenth annual symposium on Computational geometry, pp. 110-118, Clear Water Bay, Kowloon, Hong Kong, 2000

[8] 楊博鈞,「Deform Brain Data using Feature-Based Metamorphosis」,國立交通 大學,多媒體工程研究所碩士論文,民國 96 年 8 月

[9] T. Beier, S. Neely, “Feature-base image metamorphosis”, Proceedings of the ACM SIGGRAPH92 Computer Graphics, Vol.26, no.2, pp. 35-42, New York, NY, USA, July 1992.

[10] A. Lerios, C. D. Garfinkle, M. Levoy, “Feature-Based Volume Metamorphosis”, International Conference on Computer Graphics and Interactive Techniques.

Proceedings of the 22nd annual conference on Computer graphics and interactive techniques. pp. 449-456, 1995.

[11] Jörn Diedrichsen,“A spatially unbiased atlas template of the human cerebellum“,Laboratory for Computational Motor Control, Department for Biomedical Engineering, Johns Hopkins University School of Medicine, Baltimore,MD 21205, USAAugust 2006.

[12] Jia-Xiu Liu, Yong-Sheng Chen, and Li-Fen Chen. Affine and nonlinear spatial normalization techniques using derivatives of brain magnetic resonance images. In Annual Meeting of the Organization for Human Brain Mapping, Austria, 2008.

相關文件