Stages
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
nuc_t1_native
skull_masking_native
stx_register
stx_tal_to_7
stx_tal_to_6
tal_t1
nuc_inorm_t1
skull_removal
nlfit
mask_classify
pve_curvature
pve
reclassify
segment
cls_volumes
cortical_masking
segment_volumes
surface_classify
artefact
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
create_wm_hemispheres
segment_mask
expand_from_white_left
expand_from_white_right
slide_left_hemi_obj_back
flip_right_hemi_obj_back
slide_right_hemi_obj_back
calibrate_left_white
calibrate_right_white
laplace_field
gray_surface_left
gray_surface_right
mid_surface_left
mid_surface_right
surface_fit_error
verify_image_nlfit
gyrification_index_left
verify_brain_mask
classify_qc
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
dataterm_left_surface
brain_mask_qc
gyrification_index_right
dataterm_right_surface
surface_registration_left
surface_registration_right
mean_curvature_20mm_left
mean_curvature_20mm_right
thickness_tlink_20mm_right
thickness_tlink_20mm_left
resample_left_mean_curvature
resample_right_mean_curvature
resample_right_thickness
resample_left_thickness
lobe_area_right
lobe_area_left
verify_clasp
verify_image
Note: Compute the transformations necessary to bring source
images into MNI-Talairach space.
LINEAR_TRANSFORMS
(STAGE 1 ~ 6)
Linear_transforms.pm
# Compute the transformations necessary to bring source images into MNI-Talairach space.
sub stx_register {
nuc_t1_native
skull_masking_native
stx_register
stx_tal_to_7
stx_tal_to_6
}
(#stage
(#stage
(#stage
(#stage
(#stage
1)
2)
3)
4)
5)
# Since the transformations necessary to bring source images into MNI-Talairach
# space had been computed in the previous stages, now we need to 'resample' the
# images, essentially applying the computed transformation on the actual images.
sub transform {
}
tal_t1
(#stage 6)
3. stx_register
• 모듈: Linear_Transform.pm
• Label: “compute transforms to stx space”
• 실행명령: progs/multispectral_stx_registration(s)
– progs/bestlinreg.pl(s)
• bin/minccalc
• bin/mincblur
• bin/minctracc
• 입력:
– /gpfs5/jinju/civet/NL_skull_mask_native.mnc
• 출력:
– /gpfs5/jinju/civet/NL_t1_tal.xfm
• 의존성: skull_masking_native
Stage: stx_register
# Compute transforms to STX space directly or indirectly
${$pipeline_ref}->addStage(
{ name => "stx_register",
label => "compute transforms to stx space",
inputs => \@registerInputs,
outputs => \@registerOutputs,
args => ["multispectral_stx_registration", "-nothreshold",
"-clobber", @extraTransform, ${$image}->{lsqtype},
"-modeldir", $regModelDir, "-model", $regModelName,
"-source_mask", $skull_mask,
$t1_input, $t2_input, $pd_input,
$t1_tal_xfm, $t2pd_tal_xfm ],
prereqs => ["skull_masking_native"] } );
multispectral_stx_registration 실행
multispectral_stx_registration [options] T1.mnc
T2.mnc PD.mnc T1_to_tal.xfm T2PD_to_tal.xfm
/usr/local/mni/Dec-18-2008/Linuxi686/bin/multispectral_stx_registration nothreshold -clobber -single-stage -modeldir
/usr/local/mni/Linux-i686/share/mni_autoreg model icbm_avg_152_t1_tal_nlin_symmetric_VI
NL_skull_mask_native.mnc NL_t1.mnc
NL_t2.mnc NL_pd.mnc NL_t1_to_tal.xfm
NL_t2pd_to_tal.xfm
multispectral_stx_regsitration
(stage 3)
### step 1: T1 registration to talairach space
Spawn(["bestlinreg.pl", @mritotalOptions, $nativeT1,
"$modelDir/${model}.mnc",
$T1total]);
------------------------------------------------------/usr/local/mni/CIVET_06Dec/Linux-i686/CIVET1.1.7/progs/bestlinreg.pl -clobber -source_mask
/gpfs5/jinju/civet/NL_skull_mask_native.mnc -target_mask
/usr/local/mni/Linuxi686/share/mni_autoreg/icbm_avg_152_t1_tal_nlin_symmetr
ic_VI_mask.mnc -lsq9 /gpfs5/jinju/civet/NL_t1_nuc.mnc
/usr/local/mni/Linuxi686/share/mni_autoreg/icbm_avg_152_t1_tal_nlin_symmetric
_VI.mnc /gpfs5/jinju/civet/NL_t1_tal.xfm
bestlinreg.pl
• Usage: bestlinreg.pl [options] source.mnc
target.mnc output.xfm [output.mnc]
– -lsq9 : use 9-parameter transformation
(default)
• bestlinreg.pl does hierachial linear fitting
between two files. You will have to edit
the script itself to modify the fitting
levels themselves
To summarize the registration process,
the optimal solution obtained at each step is used as input to the next,
1.
2.
3.
4.
5.
Principal axis
Optimization
Optimization
Optimization
Optimization
transformation;
on σ = 8 blurred volumes with brain mask;
on σ = 4 blurred volumes with brain mask;
on σ = 8 gradient volumes with brain mask;
on σ = 4 gradient volumes with brain mask;
bestlinreg.pl _ log
minccalc -clobber -expression if(A[1]>0.5){out=A[0];}else{out=A[1];}
/gpfs5/jinju/civet/NL_t1_nuc.mnc
/gpfs5/jinju/civet/NL_skull_mask_native.mnc /tmp/bestlinreg.pl49oA1IM7/SNL_t1_nuc_masked.mnc
minccalc -clobber -expression if(A[1]>0.5){out=A[0];}else{out=A[1];}
/usr/local/mni/Linuxi686/share/mni_autoreg/icbm_avg_152_t1_tal_nlin_symmetric_VI.mnc
/usr/local/mni/Linuxi686/share/mni_autoreg/icbm_avg_152_t1_tal_nlin_symmetric_VI_mas
k.mnc /tmp/bestlinreg.pl49oA1IM7/Ticbm_avg_152_t1_tal_nlin_symmetric_VI_masked.mnc
-+-------------------------[0]------------------------| steps:
888
| blur_fwhm:
16
| simplex:
32
| source:
/tmp/bestlinreg.pl-49oA1IM7/SNL_t1_nuc_16_blur.mnc
| target:
/tmp/bestlinreg.pl49oA1IM7/Ticbm_avg_152_t1_tal_nlin_symmetric_VI_16_blur.mnc
| xfm:
/tmp/bestlinreg.pl-49oA1IM7/SNL_t1_nuc_0.xfm
-+-----------------------------------------------------
mincblur -clobber -no_apodize -fwhm 16 /tmp/bestlinreg.pl49oA1IM7/SNL_t1_nuc_masked.mnc /tmp/bestlinreg.pl49oA1IM7/SNL_t1_nuc_16
Blurring volume: ..............................................................
Making byte volume...
Outputting Volume: ............................................................
mincblur -clobber -no_apodize -fwhm 16 /tmp/bestlinreg.pl49oA1IM7/Ticbm_avg_152_t1_tal_nlin_symmetric_VI_masked.mnc
/tmp/bestlinreg.pl-49oA1IM7/Ticbm_avg_152_t1_tal_nlin_symmetric_VI_16
Blurring volume: ..............................................................
Making byte volume…
minctracc -clobber -xcorr -lsq9 -step 8 8 8 -simplex 32 -tol 0.01 est_translations -source_mask /gpfs5/jinju/civet/NL_skull_mask_native.mnc model_mask /usr/local/mni/Linuxi686/share/mni_autoreg/icbm_avg_152_t1_tal_nlin_symmetric_VI_mask.mnc
/tmp/bestlinreg.pl-49oA1IM7/SNL_t1_nuc_16_blur.mnc /tmp/bestlinreg.pl49oA1IM7/Ticbm_avg_152_t1_tal_nlin_symmetric_VI_16_blur.mnc
/tmp/bestlinreg.pl-49oA1IM7/SNL_t1_nuc_0.xfm
COG of v1: 0.339358 -5.253119 23.702366
COG of v2: 0.000000 -21.259846 12.341455
[trans] = -0.339357 -16.006727 -11.360911
Only center & trans required, now returning from init_transformation
Initial objective function val = 0.02091529
Final objective function value = 0.00431921
Transform_Type = Linear;
Linear_Transform =
1.09317111968994 -0.0436312779784203 -0.0220417715609074 0.259408831596375
0.0487397313117981 1.17682588100433 0.087762713432312 -17.7896480560303
0.0214438661932945 -0.094090573489666 1.24976813793182 -18.7893695831299;
-+-------------------------[1]------------------------| steps:
444
| blur_fwhm:
8
| simplex:
16
| source:
/tmp/bestlinreg.pl-49oA1IM7/SNL_t1_nuc_8_blur.mnc
| target:
/tmp/bestlinreg.pl49oA1IM7/Ticbm_avg_152_t1_tal_nlin_symmetric_VI_8_blur.mnc
| xfm:
/tmp/bestlinreg.pl-49oA1IM7/SNL_t1_nuc_1.xfm
-+----------------------------------------------------mincblur -clobber -no_apodize -fwhm 8 /tmp/bestlinreg.pl49oA1IM7/SNL_t1_nuc_masked.mnc /tmp/bestlinreg.pl49oA1IM7/SNL_t1_nuc_8
Blurring volume: ..............................................................
Making byte volume...
Outputting Volume: ............................................................
mincblur -clobber -no_apodize -fwhm 8 /tmp/bestlinreg.pl49oA1IM7/Ticbm_avg_152_t1_tal_nlin_symmetric_VI_masked.mnc
/tmp/bestlinreg.pl-49oA1IM7/Ticbm_avg_152_t1_tal_nlin_symmetric_VI_8
Blurring volume: ..............................................................
Making byte volume…
minctracc -clobber -xcorr -lsq9 -step 4 4 4 -simplex 16 -tol 0.004 transformation /tmp/bestlinreg.pl-49oA1IM7/SNL_t1_nuc_0.xfm -source_mask
/gpfs5/jinju/civet/NL_skull_mask_native.mnc -model_mask
/usr/local/mni/Linuxi686/share/mni_autoreg/icbm_avg_152_t1_tal_nlin_symmetric_VI_mask.mnc
/tmp/bestlinreg.pl-49oA1IM7/SNL_t1_nuc_8_blur.mnc /tmp/bestlinreg.pl49oA1IM7/Ticbm_avg_152_t1_tal_nlin_symmetric_VI_8_blur.mnc
/tmp/bestlinreg.pl-49oA1IM7/SNL_t1_nuc_1.xfm
Initial objective function val = 0.00748248
Final objective function value = 0.00665755
Transform_Type = Linear;
Linear_Transform =
1.09132206439972 0.00252406764775515 -0.0300004687160254 0.380606919527054
-0.000246312323724851 1.17316269874573 0.0897431299090385 -18.6008415222168
0.0337874442338943 -0.0934123396873474 1.2212210893631 -18.8964862823486;
-+-------------------------[2]------------------------| steps:
444
| blur_fwhm:
4
| simplex:
8
| source:
/tmp/bestlinreg.pl-49oA1IM7/SNL_t1_nuc_4_blur.mnc
| target:
/tmp/bestlinreg.pl49oA1IM7/Ticbm_avg_152_t1_tal_nlin_symmetric_VI_4_blur.mnc
| xfm:
/tmp/bestlinreg.pl-49oA1IM7/SNL_t1_nuc_2.xfm
-+----------------------------------------------------mincblur -clobber -no_apodize -fwhm 4 /tmp/bestlinreg.pl49oA1IM7/SNL_t1_nuc_masked.mnc /tmp/bestlinreg.pl49oA1IM7/SNL_t1_nuc_4
Blurring volume: ..............................................................
Making byte volume...
Outputting Volume: ............................................................
mincblur -clobber -no_apodize -fwhm 4 /tmp/bestlinreg.pl49oA1IM7/Ticbm_avg_152_t1_tal_nlin_symmetric_VI_masked.mnc
/tmp/bestlinreg.pl-49oA1IM7/Ticbm_avg_152_t1_tal_nlin_symmetric_VI_4
Making byte volume...
minctracc -clobber -xcorr -lsq9 -step 4 4 4 -simplex 8 -tol 0.004 transformation /tmp/bestlinreg.pl-49oA1IM7/SNL_t1_nuc_1.xfm -source_mask
/gpfs5/jinju/civet/NL_skull_mask_native.mnc -model_mask
/usr/local/mni/Linuxi686/share/mni_autoreg/icbm_avg_152_t1_tal_nlin_symmetric_VI_mask.mnc
/tmp/bestlinreg.pl-49oA1IM7/SNL_t1_nuc_4_blur.mnc /tmp/bestlinreg.pl49oA1IM7/Ticbm_avg_152_t1_tal_nlin_symmetric_VI_4_blur.mnc
/tmp/bestlinreg.pl-49oA1IM7/SNL_t1_nuc_2.xfm
Initial objective function val = 0.01103450
Final objective function value = 0.01072837
Transform_Type = Linear;
Linear_Transform =
1.08178782463074 0.00672860722988844 -0.0287486929446459 0.423917919397354
-0.0052237119525671 1.16246628761292 0.0755106136202812 -18.1381282806396
0.0328695774078369 -0.078993909060955 1.21836471557617 -19.6061153411865;
-+-------------------------[3]------------------------| steps:
444
| blur_fwhm:
8
| simplex:
4
| source:
/tmp/bestlinreg.pl-49oA1IM7/SNL_t1_nuc_8_dxyz.mnc
| target:
/tmp/bestlinreg.pl49oA1IM7/Ticbm_avg_152_t1_tal_nlin_symmetric_VI_8_dxyz.mnc
| xfm:
/tmp/bestlinreg.pl-49oA1IM7/SNL_t1_nuc_3.xfm
-+----------------------------------------------------mincblur -clobber -no_apodize -fwhm 8 -gradient /tmp/bestlinreg.pl49oA1IM7/SNL_t1_nuc_masked.mnc /tmp/bestlinreg.pl49oA1IM7/SNL_t1_nuc_8
Blurring volume: ..............................................................
Making byte volume...
Outputting Volume: ............................................................
Gradient volume: ......................Making byte volume dx...Outputting
Volume: ............................................................
......................Making byte volume dy...Outputting
Volume: ............................................................
..................Making byte volume dz...Outputting
Volume: ............................................................
mincblur -clobber -no_apodize -fwhm 8 -gradient /tmp/bestlinreg.pl49oA1IM7/Ticbm_avg_152_t1_tal_nlin_symmetric_VI_masked.mnc
/tmp/bestlinreg.pl-49oA1IM7/Ticbm_avg_152_t1_tal_nlin_symmetric_VI_8
Blurring volume: ..............................................................
Making byte volume...
Making byte volume dx...Making byte volume dy...Gradient
volume: ............................................................Making byte volume dz.....
minctracc -clobber -xcorr -lsq9 -step 4 4 4 -simplex 4 -tol 0.004 -transformation
/tmp/bestlinreg.pl-49oA1IM7/SNL_t1_nuc_2.xfm -source_mask
/gpfs5/jinju/civet/NL_skull_mask_native.mnc -model_mask /usr/local/mni/Linuxi686/share/mni_autoreg/icbm_avg_152_t1_tal_nlin_symmetric_VI_mask.mnc
/tmp/bestlinreg.pl-49oA1IM7/SNL_t1_nuc_8_dxyz.mnc /tmp/bestlinreg.pl49oA1IM7/Ticbm_avg_152_t1_tal_nlin_symmetric_VI_8_dxyz.mnc /tmp/bestlinreg.pl49oA1IM7/SNL_t1_nuc_3.xfm
Initial objective function val = 0.06626114
Final objective function value = 0.06265320
Transform_Type = Linear;
Linear_Transform =
1.07694697380066 0.0132912108674645 -0.0425725243985653 0.706119358539581
-0.0121657196432352 1.17944371700287 0.0604709535837173 -18.1559658050537
0.0502401664853096 -0.0636240392923355 1.25104987621307 -21.6395397186279;
-+-------------------------[4]------------------------| steps:
444
| blur_fwhm:
4
| simplex:
2
| source:
/tmp/bestlinreg.pl-49oA1IM7/SNL_t1_nuc_4_dxyz.mnc
| target:
/tmp/bestlinreg.pl49oA1IM7/Ticbm_avg_152_t1_tal_nlin_symmetric_VI_4_dxyz.mnc
| xfm:
/tmp/bestlinreg.pl-49oA1IM7/SNL_t1_nuc_4.xfm
-+----------------------------------------------------mincblur -clobber -no_apodize -fwhm 4 -gradient /tmp/bestlinreg.pl49oA1IM7/SNL_t1_nuc_masked.mnc /tmp/bestlinreg.pl-49oA1IM7/SNL_t1_nuc_4
Blurring volume: ..............................................................
Making byte volume...
Outputting Volume: ............................................................
Gradient volume: ......................Making byte volume dx...Outputting
Volume: ............................................................
.......................Making byte volume dy...Outputting
Volume: ............................................................
.................Making byte volume dz...Outputting
Volume: ............................................................
mincblur -clobber -no_apodize -fwhm 4 -gradient /tmp/bestlinreg.pl49oA1IM7/Ticbm_avg_152_t1_tal_nlin_symmetric_VI_masked.mnc
/tmp/bestlinreg.pl-49oA1IM7/Ticbm_avg_152_t1_tal_nlin_symmetric_VI_4
Making byte volume...
Making byte volume dx...Making byte volume dy...Gradient
volume: ............................................................Making byte volume dz.....
minctracc -clobber -xcorr -lsq9 -step 4 4 4 -simplex 2 -tol 0.004 transformation /tmp/bestlinreg.pl-49oA1IM7/SNL_t1_nuc_3.xfm -source_mask
/gpfs5/jinju/civet/NL_skull_mask_native.mnc -model_mask /usr/local/mni/Linuxi686/share/mni_autoreg/icbm_avg_152_t1_tal_nlin_symmetric_VI_mask.mnc
/tmp/bestlinreg.pl-49oA1IM7/SNL_t1_nuc_4_dxyz.mnc /tmp/bestlinreg.pl49oA1IM7/Ticbm_avg_152_t1_tal_nlin_symmetric_VI_4_dxyz.mnc
/tmp/bestlinreg.pl-49oA1IM7/SNL_t1_nuc_4.xfm
Initial objective function val = 0.13691664
Final objective function value = 0.13657679
mv -f /tmp/bestlinreg.pl-49oA1IM7/SNL_t1_nuc_4.xfm /gpfs5/jinju/civet/NL_t1_tal.xfm
Transform_Type = Linear;
Linear_Transform =
1.07384812831879 0.00360813410952687 -0.0395044200122356 0.75963282585144
-0.00133742042817175 1.17421615123749 0.0708918944001198 -18.1011619567871
0.0466176010668278 -0.0760336443781853 1.26026105880737 -21.7671012878418;
NL_t1_to_tal.xfm
MNI Transform File
%Fri Apr 3 15:47:23 2009>>> minctracc -clobber -xcorr -lsq9 -step 4 4 4 simplex 2 -tol 0.004 -transformation /tmp/bestlinreg.pl49oA1IM7/SNL_t1_nuc_3.xfm -source_mask
/gpfs5/jinju/civet/NL_skull_mask_native.mnc -model_mask /usr/local/mni/Linuxi686/share/mni_autoreg/icbm_avg_152_t1_tal_nlin_symmetric_VI_mask.mnc
/tmp/bestlinreg.pl-49oA1IM7/SNL_t1_nuc_4_dxyz.mnc /tmp/bestlinreg.pl49oA1IM7/Ticbm_avg_152_t1_tal_nlin_symmetric_VI_4_dxyz.mnc
/tmp/bestlinreg.pl-49oA1IM7/SNL_t1_nuc_4.xfm
%(Package mni_autoreg 0.99.3, compiled by [email protected]
(i686-pc-linux-gnu) on Fri Dec 19 04:22:22 KST 2008)
Transform_Type = Linear;
Linear_Transform =
1.07384812831879 0.00360813410952687 -0.0395044200122356 0.75963282585144
-0.00133742042817175 1.17421615123749 0.0708918944001198 -18.1011619567871
0.0466176010668278 -0.0760336443781853 1.26026105880737 -21.7671012878418;
xfm2param SNL_t1_nuc_0.xfm -after parameter extraction
-center
0.00000 0.00000 0.00000
-translation 0.25941 -17.78965 -18.78937
-rotation
-4.30547 -0.98023 2.36541
-scale
1.09426 1.18110 1.25349
-shear
0.00000 0.00000 -0.00000
xfm2param SNL_t1_nuc_1.xfm -after parameter extraction
-center
0.00000 0.00000 0.00000
-translation 0.38061 -18.60084 -18.89649
-rotation
-4.37409 -1.58018 -0.01200
-scale
1.09174 1.17659 1.22525
-shear
-0.00000 -0.00000 0.00000
xfm2param SNL_t1_nuc_2.xfm -after parameter extraction
-center
0.00000 0.00000 0.00000
-translation 0.42392 -18.13813 -19.60612
-rotation
-3.70964 -1.54214 -0.25702
-scale
1.08219 1.16493 1.22137
-shear
-0.00000 -0.00000 0.00000
xfm2param SNL_t1_nuc_3.xfm -after parameter extraction
-center
0.00000 0.00000 0.00000
-translation 0.70612 -18.15597 -21.63954
-rotation
-2.91136 -2.29671 -0.59067
-scale
1.07787 1.18106 1.25367
-shear
-0.00000 0.00000 -0.00000
xfm2param SNL_t1_nuc_4.xfm -after parameter extraction
-center
0.00000 0.00000 0.00000
-translation 0.75963 -18.10116 -21.76710
-rotation
-3.45257 -2.11459 -0.06519
-scale
1.07458 1.17636 1.26341
-shear
-0.00000 -0.00000 0.00000
© Copyright 2026 Paperzz