3dresample


  usage: 3dresample [options] -prefix OUT_DSET -input IN_DSET

  examples:

    3dresample -orient asl -rmode NN -prefix asl.dset -input in+orig
    3dresample -dxyz 1.0 1.0 0.9 -prefix 119.dset -input in+tlrc
    3dresample -master master+orig -prefix new.dset -input old+orig.  
    (resample을 한 이후 해당 파일을 master로 놓고 이후의 파일들을 맞추는 것이 좋다)

    -rmode RESAM     : use this resampling method
          e.g.  -rmode Linear
          default is NN (nearest neighbor)

          The resampling method string RESAM should come
          from the set {'NN', 'Li', 'Cu', 'Bk'}.  These
          are for 'Nearest Neighbor', 'Linear', 'Cubic'
          and 'Blocky' interpolation, respectively.

          For details, go to the 'Define Datamode' panel
          of the afni GUI, click BHelp and then the
          'ULay resam mode' menu.


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
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

taeylee@imac data % 3dresample -orient rai -dxyz 1.0 1.0 1.0 -prefix t1_al+orig -input t1.nii
taeylee@imac data % 3dinfo t1_al+orig 
++ 3dinfo: AFNI version=AFNI_20.2.02 (Jul 12 2020) [64-bit]

Dataset File:    t1_al+orig
Identifier Code: AFN_HxKLDpdL-4cjuC73j-TWmA  Creation Date: Sat Jul 18 21:59:08 2020
Template Space:  ORIG
Dataset Type:    Anat Bucket (-abuc)
Byte Order:      LSB_FIRST [this CPU native = LSB_FIRST]
Storage Mode:    BRIK
Storage Space:   19,699,200 (20 million) bytes
Geometry String: "MATRIX(1,0,0,-91.29588,0,1,0,-127.7224,0,0,1,-143.315):171,240,240"
Data Axes Tilt:  Plumb
Data Axes Orientation:
  first  (x) = Right-to-Left
  second (y) = Anterior-to-Posterior
  third  (z) = Inferior-to-Superior   [-orient RAI]
R-to-L extent:   -91.296 [R] -to-    78.704 [L] -step-     1.000 mm [171 voxels]
A-to-P extent:  -127.722 [A] -to-   111.278 [P] -step-     1.000 mm [240 voxels]
I-to-S extent:  -143.315 [I] -to-    95.685 [S] -step-     1.000 mm [240 voxels]
Number of values stored at each pixel = 1
  -- At sub-brick #0 '#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
[taeylee@imac.local: Sat Jul 18 21:59:08 2020] {AFNI_20.2.02:macos_10.12_local} 3dresample -orient rai -dxyz 1.0 1.0 1.0 -prefix t1_al+orig -input t1.nii