Baisp
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Help
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
# SPM12 ## 事前準備 在開始安裝之前,請確保您的電腦已具備以下條件: * 已安裝 MATLAB: SPM12 是 MATLAB 的一個工具箱 (Toolbox),所以必須先安裝 MATLAB。 確保 MATLAB 已啟用並能正常開啟。 * 至[SPM12官網](https://www.fil.ion.ucl.ac.uk/spm/software/spm12/)並依照指示下載並安裝SPM12 ```$ spm fmri``` >如果安裝成功,輸入上述指令稍等片刻後,SPM12 的圖形使用者介面 (GUI) 就會跳出來。 >左上為選單視窗,幾乎所有處理都在這裡完成 >左下為輔助視窗,處理過程中會顯示進度等資訊 >右側為顯示視窗,處理結果會在右側展示 >![image](https://hackmd.io/_uploads/rJL4Bddjex.png) 如果出現錯誤訊息可能是路徑設定有誤。請到 `HOME`分頁中的`Set path` 檢查 ## 首次使用 若 SPM12 已經準備就緒。可以執行最簡單的操作進行測試:顯示一張標準大腦影像。 在 SPM12 的主選單中,點擊 Display 按鈕。 >![image](https://hackmd.io/_uploads/BJ1ISO_iex.png) SPM 會開啟一個繪圖視窗,並跳出一個檔案選擇視窗。 請導覽至 SPM12 安裝路徑下的 canonical 子資料夾。 路徑範例: `C:\matlab_toolbox\spm12\canonical\` 選擇 avg152T1.nii 這個檔案,然後點擊 Done。 會在 SPM 的繪圖視窗中看到一個標準的 T1 大腦影像,並可以透過移動滑鼠來檢視不同位置的切面。 >![image](https://hackmd.io/_uploads/S1SbSuOjle.png) 這個簡單的操作證明了 SPM 的核心繪圖與檔案讀取功能運作正常。 ## 核心功能 功能性磁振造影 (fMRI) 的原始資料會受到掃描方式、受試者移動、腦解剖差異等多種因素影響。 因此在進行分析之前,需要透過一系列 **前處理 (preprocessing)** 步驟來校正與標準化資料。 以下是 **SPM** 提供的 6 個主要功能: ### 1. Realign **目的:** 校正受試者在掃描過程中的輕微頭部移動。 - fMRI 取得的是時間序列,每個時間點的腦影像可能因 **受試者微小移動** 而位置不一致。 - Realignment 會將所有時間點的功能影像配準到同一個參考影像 (通常是第一張或平均影像)。 - 輸出: - 重新校正過的功能影像。 - 移動參數 (六個:三個平移、三個旋轉),可作為後續分析中的協變數以降低運動干擾。 ### 2. Slice Timing **目的:** 校正不同切片 (slice) 掃描時間的差異。 - 影像通常是 **逐片 (slice-by-slice)** 掃描,而不是同時完成。 - 若 TR 為 2 秒、共 36 個切片,最先與最後切片的掃描時間差就可能接近 2 秒。 - Slice timing 透過插值 (interpolation) 校正這些時間差,讓整張 volume 看起來像是同時取得。 ### 3. Smooth **目的:** 空間平滑化以提升訊噪比 (SNR)。 - 使用高斯核 (Gaussian kernel) 進行平滑處理 (通常 6–8 mm FWHM)。 - 主要效果: 1. 提高訊噪比,降低小的隨機噪音。 2. 彌補解剖變異,使得同一腦區在不同受試者間更容易對齊。 ### 4. Coregister **目的:** 將功能影像 (fMRI) 與結構影像 (T1-weighted MRI) 對齊。 - fMRI 的解析度通常較低,因此需要對齊到高解析度的結構影像。 - 這樣可以: 1. 更精確地定位活化腦區。 2. 為後續的標準化 (normalisation) 提供基準。 ### 5. Normalise **目的:** 將個別受試者的腦影像轉換到標準腦空間 (如 MNI space)。 - 每個人腦的形狀與大小都不同。 - Normalisation 將個別結構/功能影像 **變形 (warping)**,匹配到標準模板腦 (template)。 - 好處: - 可以進行群體比較 (group analysis)。 - 結果能在標準座標系統下報告與重現。 ### 6. Segment **目的:** 將結構影像分割成不同組織類型 (GM, WM, CSF)。 - T1 結構影像被分成: - **灰質 (Gray Matter, GM)** - **白質 (White Matter, WM)** - **腦脊髓液 (Cerebrospinal Fluid, CSF)** ### 總結 - **Realign** → 校正頭動 - **Slice Timing** → 校正切片時間差 - **Smooth** → 提升訊噪比,符合統計假設 - **Coregister** → 功能與結構對齊 - **Normalise** → 標準化到 MNI 空間 - **Segment** → 分割組織,助於標準化與降噪 ## 使用腳本 * 在 SPM 主選單點選 Batch 按鈕 > ![image](https://hackmd.io/_uploads/BJ1ISO_iex.png) > 第 11 個按鈕 * 點選 import 按鈕導入 > ![image](https://hackmd.io/_uploads/SJdcuACoex.png) * 選擇要導入的腳本後按 `Done` > ![image](https://hackmd.io/_uploads/rJdIKCCigx.png) * 第一個 DICOM import 要選取功能像;第二個 DICOM import 要選取結構像 > ![image](https://hackmd.io/_uploads/ryIWiARogg.png) * 最後點按 Run 按鈕,隨後會生成 4D 的前處理後功能像 > ![image](https://hackmd.io/_uploads/HySTjAAige.png) ## 學習資源推薦 [SPM Manual](https://www.fil.ion.ucl.ac.uk/spm/doc/spm12_manual.pdf):對以上功能有任何疑問,或有進一步執行1st level分析的需求時看這裡 CSDN:簡中資源,可作為參考但務必謹慎使用

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully