-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathManual.txt
73 lines (54 loc) · 2.19 KB
/
Manual.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
0. 사전 작업
i. pip 설치
pip는 파이썬으로 작성된 패키지 소프트웨어를 설치, 관리하는 패키지 관리 시스템
- 윈도우 pip 설치 방법
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
ii. 기본 Shell 명령어
쉘(Shell)은 운영체제의 커널과 사용자간의 다리역할을 하는 것으로
사용자로부터 명령을 받아 그것을 해석하고 프로그램을 실행하는 역할
디렉터리(Directory) = 폴더
경로 연결 특수키 = \
- cd: 디렉터리 이동 ex) cd Desktop
- ls: 현재 디렉터리 리스트 확인 ex) ls Desktop
- pwd: 현재 위치 확인
- .: 현제 디렉터리
- ..: 상위 디렉터리
iii. PowerShell
- PowerShell 실행
- 실행파일이 있는 곳까지 디렉토리 이동
1. 기본 라이브러리 설치 작업
pip install -r requirements.txt
라이브러리 리스트
- nibabel
- numpy
- pyrobex
- dicom2nifti
- pydicom
- SimpleITK
2. 사용방법
변환을 원하는 파일, 디렉터리를 little_spm.py이 있는 곳에 두고
python little_spm.py ~~~ 실행
폴더로 작업하는 기능
- Dicom to Nifti
python little_spm.py --rotate --directory <sample directory> --angle <degree>
ex) python little_spm.py --rotate -d 15819775_T1 -a 3
- Rotate Dicoms
python little_spm.py --convert --directory <sample directory>
ex) python little_spm.py --convert -d 15819775_T1
파일로 작업하는 기능
- Image Registration
python little_spm.py --registration --input <nifti file> --template <nifti file> --iterations <numberOfIterations>
ex) python little_spm.py --registration -i 15819775.nii -t brain_atlas.nii
- Brain Smoothing
python little_spm.py --smoothing --input <nifti file> --fwhm <fwhm>
ex) python little_spm.py --smoothing -i 15819775_T1.nii -f 8
- Brain Extraction (Only run in Linux)
python little_spm.py --extract --input <nifti file>
ex) python little_spm.py --extract -i 15819775_T1.nii
- Normalization
python little_spm.py --normalize --input <nifti file>
ex) python little_spm.py --normalize -i 15819775_T1.nii
- Resize
python little_spm.py --resize --input <nifti file> -x <x> -y <y> -z <z>
ex) python little_spm.py --normalize -i 15819775_T1.nii -x 160 -y 190 -z 224