In [1]:
import analysis2 as a2
reload(a2)


Out[1]:
<module 'analysis2' from 'analysis2.pyc'>

In [2]:
import SimpleITK as sitk

In [3]:
from ndreg import *
import matplotlib
import ndio.remote.neurodata as neurodata

In [4]:
raw_s275 = sitk.ReadImage('/home/s275.nii')

In [5]:
ara3_atlas = sitk.ReadImage('/home/ara3.nii')

In [ ]:
ara3_annotations = sitk.ReadImage('/home/ara3_annotation.nii')

In [ ]:
inImg_lddmm, refAnnoImg = a2.register('s275', '/home/userToken.pem', 'IAL', raw_im = raw_s275, atlas=ara3_atlas, annotate=ara3_annotations);


Getting data from server...
(804, 979, 1114)
(1140, 800, 1320)
Finished data acquisition...
100
[0 0 0 ..., 0 0 1]
lower and upper thresholds:
100
63823
Begin CLARITY mask generation...
Begin affine transformation...
(56, 81, 98)
(114, 80, 132)
Step translation:
0.	 -0.112719540338
1.	 -0.117581130292
2.	 -0.122962549238
3.	 -0.127401628065
4.	 -0.13182518875
5.	 -0.137045999281
6.	 -0.139572518443
7.	 -0.140190073941
8.	 -0.141605512441
9.	 -0.139304295485
10.	 -0.138098636279
11.	 -0.140732909302
12.	 -0.139934696012
13.	 -0.137393164453
14.	 -0.140461507718
15.	 -0.141409342545
16.	 -0.139718619528
17.	 -0.140128979444
18.	 -0.144296300993
19.	 -0.145782669738
20.	 -0.145911519466
21.	 -0.151240228275
22.	 -0.155741111382
23.	 -0.156686376305
24.	 -0.160778960098
25.	 -0.170293038381
26.	 -0.175288369428
27.	 -0.174155077549
28.	 -0.178754878398
29.	 -0.183967253448
30.	 -0.189115772968
31.	 -0.187190605918
32.	 -0.192439279726
33.	 -0.192423309595
34.	 -0.200147126328
35.	 -0.197421780656
36.	 -0.202619194698
37.	 -0.210435518031
38.	 -0.216563342438
39.	 -0.221104906697
40.	 -0.223101166286
41.	 -0.227169540204
42.	 -0.229246759791
43.	 -0.229500895038
44.	 -0.22654248032
Step scale:
0.	 -0.249186893234
1.	 -0.254721048378
2.	 -0.303813843446
3.	 -0.284763018056
4.	 -0.298126245131
5.	 -0.296215916091
6.	 -0.296172112449
7.	 -0.2962425055
Step rigid:
0.	 -0.277921104027
1.	 -0.16229665563
2.	 -0.232770780472
3.	 -0.267834822583
4.	 -0.269059283722
5.	 -0.277511367265
6.	 -0.280627414433
7.	 -0.281487097012
8.	 -0.280971132291
9.	 -0.28182803743
10.	 -0.280317751963
11.	 -0.280503884775
12.	 -0.279793256289
13.	 -0.279029420157
14.	 -0.278427955094
15.	 -0.278085329354
16.	 -0.277886017533
17.	 -0.277851988471
18.	 -0.277874593545
19.	 -0.277958753616
20.	 -0.277933551861
21.	 -0.277858098429
22.	 -0.277819728298
23.	 -0.277750671144
24.	 -0.277736676053
25.	 -0.277755179492
26.	 -0.277761081719
27.	 -0.277820150216
28.	 -0.277862394746
29.	 -0.277924755823
30.	 -0.277952790461
31.	 -0.277977241395
32.	 -0.277913750055
33.	 -0.277848505474
34.	 -0.277768283223
35.	 -0.277760539069
36.	 -0.277705887365
37.	 -0.277595403976
38.	 -0.277491094635
39.	 -0.277345761613
40.	 -0.277144162822
41.	 -0.2769465323
42.	 -0.27665726139
43.	 -0.276440827781
44.	 -0.276187852935
45.	 -0.276024205248
46.	 -0.275865831641
47.	 -0.275669804287
48.	 -0.275479245083
49.	 -0.275286543407
50.	 -0.275098343049
51.	 -0.275031568139
52.	 -0.274935577853
53.	 -0.274973491118
54.	 -0.274915646931
55.	 -0.274736947627
56.	 -0.274675928298
57.	 -0.274500570618
58.	 -0.274270034679
59.	 -0.274119008408
60.	 -0.273968737555
61.	 -0.273806153555
62.	 -0.273731706186
63.	 -0.273629330072
64.	 -0.273554180105
65.	 -0.273482011941
66.	 -0.273466132818
67.	 -0.273359028679
68.	 -0.273264451122
69.	 -0.273211614441
70.	 -0.273068571064
71.	 -0.273028478515
72.	 -0.272948194391
73.	 -0.272837702093
74.	 -0.272676277999
75.	 -0.272576621028
76.	 -0.272551865666
77.	 -0.272411687842
78.	 -0.272358504214
79.	 -0.272311291129
80.	 -0.272291221742
81.	 -0.27226184277
82.	 -0.272281789111
83.	 -0.272211446426
84.	 -0.272148998936
85.	 -0.272007675097
86.	 -0.271890727678
87.	 -0.271789700726
88.	 -0.271596801666
89.	 -0.271448043619
90.	 -0.271280376775
91.	 -0.271141388013
92.	 -0.270958771756
93.	 -0.270844721229
94.	 -0.270677194177
95.	 -0.270512154149
96.	 -0.270300514979
97.	 -0.270187341619
98.	 -0.26999928036
99.	 -0.269834992795
Step affine:
0.	 -0.269113043198
1.	 -0.26738587891
2.	 -0.284953410045
3.	 -0.292871075121
4.	 -0.300539163913
5.	 -0.303800412264
6.	 -0.309520726425
7.	 -0.306117728815
8.	 -0.311605190655
9.	 -0.313189852951
10.	 -0.314800148974
11.	 -0.316340926806
12.	 -0.317680904416
13.	 -0.318730661258
14.	 -0.320119250815
15.	 -0.321038767994
16.	 -0.323425718529
17.	 -0.323652917384
18.	 -0.327045054848
19.	 -0.325327805569
20.	 -0.329658480314
21.	 -0.327346727277
22.	 -0.331568497901
23.	 -0.330814177859
24.	 -0.331514210049
25.	 -0.332097128791
26.	 -0.332766708238
27.	 -0.333276210234
28.	 -0.333861940463
29.	 -0.334380688389
30.	 -0.334716140635
31.	 -0.334993034288
32.	 -0.33522632932
33.	 -0.335461524816
34.	 -0.335542556972
35.	 -0.335704544513
36.	 -0.335869534547
37.	 -0.33604618502
38.	 -0.336346242047
39.	 -0.33652118117
40.	 -0.33681010673
41.	 -0.33711676066
42.	 -0.337312447465
43.	 -0.337572260153
44.	 -0.337823832177
45.	 -0.337896051693
46.	 -0.338112369383
47.	 -0.3380915677
48.	 -0.338224478908
49.	 -0.338314442557
50.	 -0.338323543617
51.	 -0.338337819102
52.	 -0.338381130662
53.	 -0.338562491196
54.	 -0.338648354261
55.	 -0.338640821667
56.	 -0.338643310783
57.	 -0.338636915584
58.	 -0.338616339309
59.	 -0.338496183712
60.	 -0.338547875878
61.	 -0.338528867937
62.	 -0.338543010793
63.	 -0.338409573261
64.	 -0.338545254441
65.	 -0.338044623361
66.	 -0.33833430262
67.	 -0.337940086794
68.	 -0.338101959344
69.	 -0.337813750317
70.	 -0.337901680003
71.	 -0.337744640058
72.	 -0.33776482308
73.	 -0.337618482389
74.	 -0.337677734243
75.	 -0.337653069097
76.	 -0.337569847321
77.	 -0.337510853275
78.	 -0.337416248718
79.	 -0.337333748751
80.	 -0.337223365601
81.	 -0.337117617618
82.	 -0.337048082804
83.	 -0.336933517913
84.	 -0.336901912151
85.	 -0.336852929373
86.	 -0.33679392397
87.	 -0.336706652187
88.	 -0.336605831627
89.	 -0.336568513474
90.	 -0.336513059659
91.	 -0.336433525303
92.	 -0.336372520868
93.	 -0.336239097459
94.	 -0.336084645431
95.	 -0.335923231632
96.	 -0.335856275673
97.	 -0.335753277319
98.	 -0.335743543879
99.	 -0.335706368518
Begin LDDMM...

Step 0: alpha=0.05, beta=0.05, scale=1.0

In [ ]:
imShow(inImg_lddmm, vmax=1000);

In [ ]: