3drefit


Changes some of the information inside a 3D dataset's header. ~1~
Note that this program does NOT change the .BRIK file at all;
the main purpose of 3drefit is to fix up errors made when
using to3d.

-orient code Sets the orientation of the 3D volume(s) in the .BRIK.
     The code must be 3 letters, one each from the
     pairs {R,L} {A,P} {I,S}. The first letter gives
     the orientation of the x-axis, the second the
     orientation of the y-axis, the third the z-axis:
     R = right-to-left L = left-to-right
     A = anterior-to-posterior P = posterior-to-anterior
     I = inferior-to-superior S = superior-to-inferior
     ** WARNING: when changing the orientation, you must be sure
     to check the origins as well, to make sure that the volume
     is positioned correctly in space.

-deoblique Replace transformation matrix in header with cardinal matrix.
     This option DOES NOT deoblique the volume. To do so
     you should use 3dWarp -deoblique. This option is not
     to be used unless you really know what you're doing.

taeylee@imac data % 3dinfo t1.nii
++ 3dinfo: AFNI version=AFNI_20.2.02 (Jul 12 2020) [64-bit]
Dataset File: /Users/taeylee/Desktop/data/t1.nii
Identifier Code: AFN_fkRhSIgQ09f4pkYksNCTqA Creation Date: Fri Jul 17 13:04:53 2020
Template Space: ORIG
Dataset Type: Anat Bucket (-abuc)
Byte Order: LSB_FIRST {assumed} [this CPU native = LSB_FIRST]
Storage Mode: NIFTI
Storage Space: 22,413,312 (22 million) bytes
Geometry String: "MATRIX(0,0,-1,78.70412,0.935171,0.06604,0,-127.7536,0.06604,-0.935171,0,95.7162):256,256,171"
Data Axes Tilt: Oblique (4.039 deg. from plumb) (oblique하게 데이터가 위치한다)
Data Axes Approximate Orientation:
first (x) = Anterior-to-Posterior
second (y) = Superior-to-Inferior
third (z) = Left-to-Right [-orient ASL]
R-to-L extent: -91.296 [R] -to- 78.704 [L] -step- 1.000 mm [171 voxels]
A-to-P extent: -127.754 [A] -to- 111.309 [P] -step- 0.938 mm [256 voxels]
I-to-S extent: -143.346 [I] -to- 95.716 [S] -step- 0.938 mm [256 voxels]
Number of values stored at each pixel = 1
-- At sub-brick #0 '?' datum type is short: 0 to 326

----- HISTORY -----
[taeylee@imac.local: Fri Jul 17 13:04:53 2020] to3d -quit_on_err -prefix t1.nii -use_last_elem I1000000 I2000000 I3000000 ... I1700001 I1710000


taeylee@imac data % 3drefit -deoblique t1.nii

++ 3drefit: AFNI version=AFNI_20.2.02 (Jul 12 2020) [64-bit]
++ Authored by: RW Cox
++ Processing AFNI dataset t1.nii
+ deoblique
+ loading and re-writing dataset t1.nii (/Users/taeylee/Desktop/data/t1.nii in NIFTI storage)
++ 3drefit processed 1 datasets

taeylee@imac data % 3dinfo t1.nii
++ 3dinfo: AFNI version=AFNI_20.2.02 (Jul 12 2020) [64-bit]
Dataset File: /Users/taeylee/Desktop/data/t1.nii
Identifier Code: AFN_fkRhSIgQ09f4pkYksNCTqA Creation Date: Fri Jul 17 13:04:53 2020
Template Space: ORIG
Dataset Type: Anat Bucket (-abuc)
Byte Order: LSB_FIRST {assumed} [this CPU native = LSB_FIRST]
Storage Mode: NIFTI
Storage Space: 22,413,312 (22 million) bytes
Geometry String: "MATRIX(0,0,-1,78.70412,0.9375,0,0,-127.7536,0,-0.9375,0,95.7162):256,256,171"
Data Axes Tilt: Plumb (deoblique 시행이후 바르게 정렬된 것을 확인할 수 있다)
Data Axes Orientation:
first (x) = Anterior-to-Posterior
second (y) = Superior-to-Inferior
third (z) = Left-to-Right [-orient ASL]
R-to-L extent: -91.296 [R] -to- 78.704 [L] -step- 1.000 mm [171 voxels]
A-to-P extent: -127.754 [A] -to- 111.309 [P] -step- 0.938 mm [256 voxels]
I-to-S extent: -143.346 [I] -to- 95.716 [S] -step- 0.938 mm [256 voxels]
Number of values stored at each pixel = 1
-- At sub-brick #0 '?' datum type is short: 0 to 326

----- HISTORY -----
[taeylee@imac.local: Fri Jul 17 13:04:53 2020] to3d -quit_on_err -prefix t1.nii -use_last_elem I1000000 I2000000 I3000000 ... I1700001 I1710000
[taeylee@imac.local: Sat Jul 18 21:40:19 2020] {AFNI_20.2.02:macos_10.12_local} 3drefit -deoblique t1.nii (새롭게 실행한 명령어가 추가되어있다)