help
help > RE: Overwrite libtiff in Matlab to run IO toolbox
Aug 10, 2011 05:08 PM | Hanchuan Peng
RE: Overwrite libtiff in Matlab to run IO toolbox
attached is my screen-shot of the
three files, which are quite different...(which is what I believe
to be correct) I am not sure what happened at your end...
-hanchuan
Originally posted by Thomas Templier:
-hanchuan
Originally posted by Thomas Templier:
Hum, it's annoying. I've tested the images on
the website with the option -F test1 and I notice the same things.
It outputed these files :
Strange things : in the log, it says that the files are not in tif format, but they are, and it outputs the file test1target.raw. The names of the DF files seem weird also (why 999 ?)
The command I've used is :
./brainaligner -t test1_256.tif -s test2_256.tif -L test1_256.marker -w 10 -o t21_256.tif -F test1
Is it normal or there is something wrong ?
Best Regards and thanks for the help.
Thomas
The log of BrainAligner is :
Originally posted by Hanchuan Peng:
total 128452
-rwxrwxr-x. 1 templier templier 2449948 Aug 10 14:44 brainaligner
-rwxrwxr-x. 1 templier templier 1589 Aug 10 14:45 test1_256.marker
-rwxrwxr-x. 1 templier templier 7098416 Aug 10 14:45 test1_256.tif
-rwxrwxr-x. 1 templier templier 7098416 Aug 10 14:45 test2_256.tif
-rw-rw-r--. 1 templier templier 7077931 Aug 10 15:09 test1target.raw
-rw-rw-r--. 1 templier templier 336 Aug 10 15:10 t21_256.tif_target.csv
-rw-rw-r--. 1 templier templier 333 Aug 10 15:10 t21_256.tif_subject.csv
-rw-rw-r--. 1 templier templier 54 Aug 10 15:10 t21_256.tif_matching_quality.csv
-rw-rw-r--. 1 templier templier 33554475 Aug 10 15:10 test1_999_DF_sx.v3draw
-rw-rw-r--. 1 templier templier 33554475 Aug 10 15:10 test1_999_DF_sy.v3draw
-rw-rw-r--. 1 templier templier 33554475 Aug 10 15:10 test1_999_DF_sz.v3draw
-rw-rw-r--. 1 templier templier 7098416 Aug 10 15:10 t21_256.tif
If I drag&drop the DF files into V3D, it says "The file does
not exist!" Do nothing. So I make File>Import>Import general
image series with the default options (1,1,1, no pattern and Pack
images in Z dimension). It gives me the screenshot on the attached
file. They have exactly the same values.-rwxrwxr-x. 1 templier templier 2449948 Aug 10 14:44 brainaligner
-rwxrwxr-x. 1 templier templier 1589 Aug 10 14:45 test1_256.marker
-rwxrwxr-x. 1 templier templier 7098416 Aug 10 14:45 test1_256.tif
-rwxrwxr-x. 1 templier templier 7098416 Aug 10 14:45 test2_256.tif
-rw-rw-r--. 1 templier templier 7077931 Aug 10 15:09 test1target.raw
-rw-rw-r--. 1 templier templier 336 Aug 10 15:10 t21_256.tif_target.csv
-rw-rw-r--. 1 templier templier 333 Aug 10 15:10 t21_256.tif_subject.csv
-rw-rw-r--. 1 templier templier 54 Aug 10 15:10 t21_256.tif_matching_quality.csv
-rw-rw-r--. 1 templier templier 33554475 Aug 10 15:10 test1_999_DF_sx.v3draw
-rw-rw-r--. 1 templier templier 33554475 Aug 10 15:10 test1_999_DF_sy.v3draw
-rw-rw-r--. 1 templier templier 33554475 Aug 10 15:10 test1_999_DF_sz.v3draw
-rw-rw-r--. 1 templier templier 7098416 Aug 10 15:10 t21_256.tif
Strange things : in the log, it says that the files are not in tif format, but they are, and it outputs the file test1target.raw. The names of the DF files seem weird also (why 999 ?)
The command I've used is :
./brainaligner -t test1_256.tif -s test2_256.tif -L test1_256.marker -w 10 -o t21_256.tif -F test1
Is it normal or there is something wrong ?
Best Regards and thanks for the help.
Thomas
The log of BrainAligner is :
The current input file has the surfix
[tif]
#original slice=108 original rez=1.00000 -> #output slices=108 new rez=1.00000
The current input file has the surfix [tif]
#original slice=108 original rez=1.00000 -> #output slices=108 new rez=1.00000
After preprocessing:
Size of subject_image = [256 256 108 1], size of target_image = [256 256 108 1].
-------------------------------------------------
***BrainAligner [version=0.942] parameters:
Target file: [test1_256.tif]
Target rez: [1.0000][1.0000][1.0000]
Ref chanl tgt: [0]
Landmark tgt: [test1_256.marker]
Subject file: [test2_256.tif]
Subject rez: [1.0000][1.0000][1.0000]
Warp res file: [t21_256.tif]
Warp img size: [512]
Ref chanl sbj: [0]
Landmark sbj: [(null)]
Align G/L type: [Local]
Hierarchical landmark search level: [1]
Landmark matching method: [1]
Displacement field producing method: [3]
Use nearest neighbor interpolation method: [0]
Displacement field file: [test1]
Convert to UINT8 for processing: [No]
Resample to pixel size 0.58um for processing: [No]
Volume change map file: [(null)]
Target copy channel (for attaching mask): [-1]
Subject paste channel (for attaching mask): [-1]
Verbose print: [0]
---------------------------------------------------
********************* target=uint8 subject=uint8
in setInitData(), the target image data normalizer=255.000
The current input file has the surfix [raw]
The data is not with a TIF surfix, -- now this program assumes it is RAW format defined by Hanchuan Peng.
size of [V3DLONG]=[8], [V3DLONG]=[8] [int]=[4], [short int]=[2], [double]=[8], [float]=[4]
in setInitData(), the subject image data normalizer=255.000
Done: data initilization.
Read 65 predefined control points from the file. Thus will not invoke the automatic control point detection.
target coord[0]=[87, 138, 43] around subject [87, 138, 43]: target [43][138][87] -> subject[49][122][87]
target coord[1]=[2, 148, 31] around subject [2, 148, 31]: ...... not added due to inconsistency of various matching scores.
target coord[2]=[6, 80, 33] around subject [6, 80, 33]: ...... not added due to inconsistency of various matching scores.
target coord[3]=[68, 58, 56] around subject [68, 58, 56]: target [56][58][68] -> subject[66][58][72]
target coord[4]=[121, 203, 67] around subject [121, 203, 67]: target [67][203][121] -> subject[71][198][111]
target coord[5]=[226, 145, 67] around subject [226, 145, 67]: ...... not added due to inconsistency of various matching scores.
target coord[6]=[87, 184, 20] around subject [87, 184, 20]: ...... not added due to inconsistency of various matching scores.
target coord[7]=[151, 96, 72] around subject [151, 96, 72]: target [72][96][151] -> subject[77][103][159]
target coord[8]=[23, 108, 25] around subject [23, 108, 25]: ...... not added due to inconsistency of various matching scores.
target coord[9]=[49, 198, 40] around subject [49, 198, 40]: target [40][198][49] -> subject[40][179][43]
target coord[10]=[121, 145, 26] around subject [121, 145, 26]: ...... not added due to inconsistency of various matching scores.
target coord[11]=[31, 112, 40] around subject [31, 112, 40]: ...... not added due to inconsistency of various matching scores.
target coord[12]=[29, 70, 63] around subject [29, 70, 63]: target [63][70][29] -> subject[69][60][27]
target coord[13]=[86, 230, 58] around subject [86, 230, 58]: target [58][230][86] -> subject[57][219][85]
target coord[14]=[6, 142, 77] around subject [6, 142, 77]: target [77][142][6] -> subject[81][136][1]
target coord[15]=[166, 197, 34] around subject [166, 197, 34]: target [34][197][166] -> subject[35][188][162]
target coord[16]=[78, 85, 34] around subject [78, 85, 34]: target [34][85][78] -> subject[43][84][84]
target coord[17]=[198, 81, 69] around subject [198, 81, 69]: target [69][81][198] -> subject[73][79][201]
target coord[18]=[13, 240, 55] around subject [13, 240, 55]: ...... not added due to inconsistency of various matching scores.
target coord[19]=[89, 170, 44] around subject [89, 170, 44]: target [44][170][89] -> subject[48][152][88]
target coord[20]=[69, 123, 46] around subject [69, 123, 46]: target [46][123][69] -> subject[52][108][71]
target coord[21]=[76, 125, 36] around subject [76, 125, 36]: ...... not added due to inconsistency of various matching scores.
target coord[22]=[31, 116, 39] around subject [31, 116, 39]: ...... not added due to inconsistency of various matching scores.
target coord[23]=[170, 200, 36] around subject [170, 200, 36]: ...... not added due to inconsistency of various matching scores.
target coord[24]=[77, 84, 36] around subject [77, 84, 36]: ...... not added due to inconsistency of various matching scores.
target coord[25]=[74, 82, 74] around subject [74, 82, 74]: target [74][82][74] -> subject[84][81][77]
target coord[26]=[147, 208, 74] around subject [147, 208, 74]: target [74][208][147] -> subject[77][204][138]
target coord[27]=[60, 113, 74] around subject [60, 113, 74]: target [74][113][60] -> subject[83][114][60]
target coord[28]=[66, 63, 53] around subject [66, 63, 53]: target [53][63][66] -> subject[63][62][71]
target coord[29]=[197, 195, 59] around subject [197, 195, 59]: target [59][195][197] -> subject[61][188][190]
target coord[30]=[137, 206, 59] around subject [137, 206, 59]: target [59][206][137] -> subject[64][199][128]
target coord[31]=[172, 202, 59] around subject [172, 202, 59]: target [59][202][172] -> subject[63][197][168]
target coord[32]=[104, 191, 77] around subject [104, 191, 77]: ...... not added due to inconsistency of various matching scores.
target coord[33]=[83, 152, 81] around subject [83, 152, 81]: ...... not added due to inconsistency of various matching scores.
target coord[34]=[76, 169, 81] around subject [76, 169, 81]: target [81][169][76] -> subject[85][164][67]
target coord[35]=[46, 179, 76] around subject [46, 179, 76]: ...... not added due to inconsistency of various matching scores.
target coord[36]=[89, 145, 49] around subject [89, 145, 49]: target [49][145][89] -> subject[55][125][87]
target coord[37]=[73, 146, 49] around subject [73, 146, 49]: ...... not added due to inconsistency of various matching scores.
target coord[38]=[30, 73, 55] around subject [30, 73, 55]: ...... not added due to inconsistency of various matching scores.
target coord[39]=[12, 147, 38] around subject [12, 147, 38]: target [38][147][12] -> subject[36][141][8]
target coord[40]=[48, 197, 39] around subject [48, 197, 39]: target [39][197][48] -> subject[38][178][41]
target coord[41]=[48, 221, 39] around subject [48, 221, 39]: target [39][221][48] -> subject[42][208][47]
target coord[42]=[12, 214, 39] around subject [12, 214, 39]: ...... not added due to inconsistency of various matching scores.
target coord[43]=[34, 235, 39] around subject [34, 235, 39]: ...... not added due to inconsistency of various matching scores.
target coord[44]=[47, 116, 54] around subject [47, 116, 54]: target [54][116][47] -> subject[58][105][40]
target coord[45]=[42, 221, 54] around subject [42, 221, 54]: target [54][221][42] -> subject[54][212][39]
target coord[46]=[11, 148, 54] around subject [11, 148, 54]: target [54][148][11] -> subject[54][142][7]
target coord[47]=[77, 176, 54] around subject [77, 176, 54]: ...... not added due to inconsistency of various matching scores.
target coord[48]=[27, 205, 54] around subject [27, 205, 54]: target [54][205][27] -> subject[53][197][22]
target coord[49]=[84, 238, 54] around subject [84, 238, 54]: ...... not added due to inconsistency of various matching scores.
target coord[50]=[92, 112, 45] around subject [92, 112, 45]: target [45][112][92] -> subject[53][111][99]
target coord[51]=[137, 184, 45] around subject [137, 184, 45]: target [45][184][137] -> subject[50][176][128]
target coord[52]=[121, 189, 45] around subject [121, 189, 45]: ...... not added due to inconsistency of various matching scores.
target coord[53]=[178, 135, 71] around subject [178, 135, 71]: ...... not added due to inconsistency of various matching scores.
target coord[54]=[178, 183, 69] around subject [178, 183, 69]: ...... not added due to inconsistency of various matching scores.
target coord[55]=[81, 156, 26] around subject [81, 156, 26]: ...... not added due to inconsistency of various matching scores.
target coord[56]=[30, 191, 26] around subject [30, 191, 26]: ...... not added due to inconsistency of various matching scores.
target coord[57]=[33, 234, 26] around subject [33, 234, 26]: target [26][234][33] -> subject[17][238][13]
target coord[58]=[13, 179, 26] around subject [13, 179, 26]: target [26][179][13] -> subject[17][161][2]
target coord[59]=[29, 146, 22] around subject [29, 146, 22]: ...... not added due to inconsistency of various matching scores.
target coord[60]=[18, 226, 18] around subject [18, 226, 18]: ...... not added due to inconsistency of various matching scores.
target coord[61]=[9, 185, 12] around subject [9, 185, 12]: target [12][185][9] -> subject[4][169][3]
target coord[62]=[13, 231, 12] around subject [13, 231, 12]: target [12][231][13] -> subject[4][228][0]
target coord[63]=[23, 107, 29] around subject [23, 107, 29]: ...... not added due to inconsistency of various matching scores.
target coord[64]=[71, 124, 29] around subject [71, 124, 29]: target [29][124][71] -> subject[19][138][76]
(1). normalize the point cloud
(2). estimate the initial affine matrix from initial matching using RANSAC
0,
( 0). err_invp_min=5.313598
( 3). err_invp_min=5.036110
5,
( 9). err_invp_min=4.519104
10, 15, 20, 25,
( 29). err_invp_min=4.481841
30, 35, 40,
( 43). err_invp_min=4.087120
45,
50, 55,
( 56). err_invp_min=3.705978
60, 65, 70, 75, 80, 85,
( 88). err_invp_min=3.688620
90, 95,
100, 105, 110, 115, 120, 125, 130, 135, 140, 145,
150, 155, 160, 165, 170, 175, 180, 185, 190, 195,
200, 205, 210, 215, 220, 225, 230, 235, 240, 245,
250, 255, 260, 265, 270, 275, 280, 285, 290, 295,
300, 305, 310, 315, 320, 325, 330, 335, 340, 345,
350, 355, 360, 365, 370, 375, 380,
( 381). err_invp_min=3.660280
385, 390, 395,
400, 405, 410, 415, 420, 425, 430, 435, 440, 445,
450, 455, 460, 465, 470, 475, 480, 485, 490, 495,
500, 505, 510, 515, 520, 525, 530, 535, 540, 545,
550, 555, 560, 565, 570, 575, 580, 585, 590, 595,
600, 605, 610, 615, 620, 625, 630, 635, 640, 645,
650, 655, 660, 665, 670, 675, 680, 685, 690, 695,
700, 705, 710, 715, 720, 725, 730, 735, 740, 745,
750, 755, 760, 765, 770, 775, 780, 785, 790, 795,
800, 805, 810, 815, 820, 825, 830, 835, 840, 845,
850, 855, 860, 865, 870, 875, 880, 885, 890, 895,
900, 905, 910, 915, 920, 925, 930, 935, 940, 945,
950, 955, 960, 965, 970, 975, 980, 985, 990, 995,
(3). kill the wrong matches by comparing the distance between A and the corresponding B_invp
(4). de-normalization and get arr_2_invp!
kill 4 pairs, 32 pairs left!
angle12=12.064 [tedge len=23.622 e1=24.434, e2=46.957] - drop this plane
angle13=8.083 [tedge len=6.164 e1=41.400, e2=38.962] - drop this plane
angle13=6.596 [tedge len=6.164 e1=36.235, e2=31.448] - drop this plane
angle13=11.578 [tedge len=6.164 e1=30.594, e2=29.428] - drop this plane
angle13=1.975 [tedge len=1.732 e1=48.990, e2=49.346] - drop this plane
angle12=3.519 [tedge len=1.732 e1=24.000, e2=23.043] - drop this plane
angle12=2.685 [tedge len=1.732 e1=28.931, e2=27.821] - drop this plane
angle12=3.675 [tedge len=1.732 e1=27.019, e2=27.000] - drop this plane
angle12=0.907 [tedge len=1.732 e1=41.449, e2=43.046] - drop this plane
angle12=160.162 [tedge len=39.774 e1=16.062, e2=24.290] - drop this plane
angle13=18.892 [tedge len=16.062 e1=49.417, e2=48.166] - drop this plane
angle23=14.836 [tedge len=15.748 e1=46.141, e2=34.191] - drop this plane
angle23=17.702 [tedge len=15.748 e1=48.929, e2=41.449] - drop this plane
angle23=16.322 [tedge len=15.748 e1=49.880, e2=40.694] - drop this plane
=============================
cc[1]=13.548 target=[87,138,43] subject=[87,122,49]
cc[2]=6.050 target=[68,58,56] subject=[72,58,66]
cc[3]=24.096 target=[121,203,67] subject=[111,198,71]
cc[4]=46.566 target=[151,96,72] subject=[159,103,77]
cc[5]=31.145 target=[49,198,40] subject=[43,179,40]
cc[6]=43.801 target=[29,70,63] subject=[27,60,69]
cc[7]=9.623 target=[86,230,58] subject=[85,219,57]
cc[8]=29.279 target=[6,142,77] subject=[1,136,81]
cc[9]=39.209 target=[166,197,34] subject=[162,188,35]
cc[10]=0.000 target=[78,85,34] subject=[84,84,43]
cc[11]=76.491 target=[198,81,69] subject=[201,79,73]
cc[12]=13.102 target=[89,170,44] subject=[88,152,48]
cc[13]=15.982 target=[69,123,46] subject=[71,108,52]
cc[14]=40.400 target=[74,82,74] subject=[77,81,84]
cc[15]=31.833 target=[147,208,74] subject=[138,204,77]
cc[16]=0.000 target=[60,113,74] subject=[60,114,83]
cc[17]=7.052 target=[66,63,53] subject=[71,62,63]
cc[18]=48.946 target=[197,195,59] subject=[190,188,61]
cc[19]=25.529 target=[137,206,59] subject=[128,199,64]
cc[20]=42.054 target=[172,202,59] subject=[168,197,63]
cc[21]=0.000 target=[76,169,81] subject=[67,164,85]
cc[22]=50.794 target=[12,147,38] subject=[8,141,36]
cc[23]=30.009 target=[48,197,39] subject=[41,178,38]
cc[24]=51.661 target=[48,221,39] subject=[47,208,42]
cc[25]=20.506 target=[47,116,54] subject=[40,105,58]
cc[26]=50.273 target=[42,221,54] subject=[39,212,54]
cc[27]=21.883 target=[11,148,54] subject=[7,142,54]
cc[28]=44.135 target=[27,205,54] subject=[22,197,53]
cc[29]=8.767 target=[92,112,45] subject=[99,111,53]
cc[30]=31.467 target=[137,184,45] subject=[128,176,50]
cc[31]=71.150 target=[13,179,26] subject=[2,161,17]
cc[32]=90.935 target=[9,185,12] subject=[3,169,4]
Overall mean=31.759 std=22.562
-------------------- Finished detecting the best matching points. Now compute displacement field. -------
Prepare save the matching quality record file [t21_256.tif_matching_quality.csv]
method_inconsistency= 0.5077, model_violation=31.7590
Now save to matching point file of subject to [t21_256.tif_subject.csv]
Now save to matching point file of target to [t21_256.tif_target.csv]
---------------------------------
n=0 x=[87.000 -> 87.000] y=[138.000 -> 122.000] z=[43.000 -> 49.000]
n=1 x=[68.000 -> 72.000] y=[58.000 -> 58.000] z=[56.000 -> 66.000]
n=2 x=[121.000 -> 111.000] y=[203.000 -> 198.000] z=[67.000 -> 71.000]
n=3 x=[151.000 -> 159.000] y=[96.000 -> 103.000] z=[72.000 -> 77.000]
n=4 x=[49.000 -> 43.000] y=[198.000 -> 179.000] z=[40.000 -> 40.000]
n=5 x=[29.000 -> 27.000] y=[70.000 -> 60.000] z=[63.000 -> 69.000]
n=6 x=[86.000 -> 85.000] y=[230.000 -> 219.000] z=[58.000 -> 57.000]
n=7 x=[6.000 -> 1.000] y=[142.000 -> 136.000] z=[77.000 -> 81.000]
n=8 x=[166.000 -> 162.000] y=[197.000 -> 188.000] z=[34.000 -> 35.000]
n=9 x=[78.000 -> 84.000] y=[85.000 -> 84.000] z=[34.000 -> 43.000]
n=10 x=[198.000 -> 201.000] y=[81.000 -> 79.000] z=[69.000 -> 73.000]
n=11 x=[89.000 -> 88.000] y=[170.000 -> 152.000] z=[44.000 -> 48.000]
n=12 x=[69.000 -> 71.000] y=[123.000 -> 108.000] z=[46.000 -> 52.000]
n=13 x=[74.000 -> 77.000] y=[82.000 -> 81.000] z=[74.000 -> 84.000]
n=14 x=[147.000 -> 138.000] y=[208.000 -> 204.000] z=[74.000 -> 77.000]
n=15 x=[60.000 -> 60.000] y=[113.000 -> 114.000] z=[74.000 -> 83.000]
n=16 x=[66.000 -> 71.000] y=[63.000 -> 62.000] z=[53.000 -> 63.000]
n=17 x=[197.000 -> 190.000] y=[195.000 -> 188.000] z=[59.000 -> 61.000]
n=18 x=[137.000 -> 128.000] y=[206.000 -> 199.000] z=[59.000 -> 64.000]
n=19 x=[172.000 -> 168.000] y=[202.000 -> 197.000] z=[59.000 -> 63.000]
n=20 x=[76.000 -> 67.000] y=[169.000 -> 164.000] z=[81.000 -> 85.000]
n=21 x=[12.000 -> 8.000] y=[147.000 -> 141.000] z=[38.000 -> 36.000]
n=22 x=[48.000 -> 41.000] y=[197.000 -> 178.000] z=[39.000 -> 38.000]
n=23 x=[48.000 -> 47.000] y=[221.000 -> 208.000] z=[39.000 -> 42.000]
n=24 x=[47.000 -> 40.000] y=[116.000 -> 105.000] z=[54.000 -> 58.000]
n=25 x=[42.000 -> 39.000] y=[221.000 -> 212.000] z=[54.000 -> 54.000]
n=26 x=[11.000 -> 7.000] y=[148.000 -> 142.000] z=[54.000 -> 54.000]
n=27 x=[27.000 -> 22.000] y=[205.000 -> 197.000] z=[54.000 -> 53.000]
n=28 x=[92.000 -> 99.000] y=[112.000 -> 111.000] z=[45.000 -> 53.000]
n=29 x=[137.000 -> 128.000] y=[184.000 -> 176.000] z=[45.000 -> 50.000]
n=30 x=[13.000 -> 2.000] y=[179.000 -> 161.000] z=[26.000 -> 17.000]
n=31 x=[9.000 -> 3.000] y=[185.000 -> 169.000] z=[12.000 -> 4.000]
#################################
-------------------- Now compute the distances of pixels to the mapping points. -------
z=0 z=1 z=2 z=3 z=4 z=5 z=6 z=7 z=8 z=9 z=10 z=11 z=12 z=13 z=14 z=15 z=16 z=17 z=18 z=19 z=20 z=21 z=22 z=23 z=24 z=25 z=26 z=27 z=28 z=29 z=30 z=31 z=32
-------------------- Now interpolate the DF using linear method. -------
in ApplyDFToChannel(), the subject image data normalizer=255.000
Finish warping the 0th channel.
Done: warping.
Succeed to warp using the DF to the specified channel(s).
The current input file has the surfix [v3draw]
The data is not with a TIF surfix, -- now this program assumes it is RAW format defined by Hanchuan Peng.
size of [V3DLONG]=[8], [V3DLONG]=[8] [int]=[4], [short int]=[2], [double]=[8], [float]=[4]
Succeed to save to file test1_999_DF_sx.v3draw
The current input file has the surfix [v3draw]
The data is not with a TIF surfix, -- now this program assumes it is RAW format defined by Hanchuan Peng.
size of [V3DLONG]=[8], [V3DLONG]=[8] [int]=[4], [short int]=[2], [double]=[8], [float]=[4]
Succeed to save to file test1_999_DF_sy.v3draw
The current input file has the surfix [v3draw]
The data is not with a TIF surfix, -- now this program assumes it is RAW format defined by Hanchuan Peng.
size of [V3DLONG]=[8], [V3DLONG]=[8] [int]=[4], [short int]=[2], [double]=[8], [float]=[4]
Succeed to save to file test1_999_DF_sz.v3draw
Now save the output/warped image [pointer=0x811d250] datatype_warped=1 sz_warped=[256, 256, 108, 1]
The current input file has the surfix [tif]
The warped image has been saved to the file [t21_256.tif].
#original slice=108 original rez=1.00000 -> #output slices=108 new rez=1.00000
The current input file has the surfix [tif]
#original slice=108 original rez=1.00000 -> #output slices=108 new rez=1.00000
After preprocessing:
Size of subject_image = [256 256 108 1], size of target_image = [256 256 108 1].
-------------------------------------------------
***BrainAligner [version=0.942] parameters:
Target file: [test1_256.tif]
Target rez: [1.0000][1.0000][1.0000]
Ref chanl tgt: [0]
Landmark tgt: [test1_256.marker]
Subject file: [test2_256.tif]
Subject rez: [1.0000][1.0000][1.0000]
Warp res file: [t21_256.tif]
Warp img size: [512]
Ref chanl sbj: [0]
Landmark sbj: [(null)]
Align G/L type: [Local]
Hierarchical landmark search level: [1]
Landmark matching method: [1]
Displacement field producing method: [3]
Use nearest neighbor interpolation method: [0]
Displacement field file: [test1]
Convert to UINT8 for processing: [No]
Resample to pixel size 0.58um for processing: [No]
Volume change map file: [(null)]
Target copy channel (for attaching mask): [-1]
Subject paste channel (for attaching mask): [-1]
Verbose print: [0]
---------------------------------------------------
********************* target=uint8 subject=uint8
in setInitData(), the target image data normalizer=255.000
The current input file has the surfix [raw]
The data is not with a TIF surfix, -- now this program assumes it is RAW format defined by Hanchuan Peng.
size of [V3DLONG]=[8], [V3DLONG]=[8] [int]=[4], [short int]=[2], [double]=[8], [float]=[4]
in setInitData(), the subject image data normalizer=255.000
Done: data initilization.
Read 65 predefined control points from the file. Thus will not invoke the automatic control point detection.
target coord[0]=[87, 138, 43] around subject [87, 138, 43]: target [43][138][87] -> subject[49][122][87]
target coord[1]=[2, 148, 31] around subject [2, 148, 31]: ...... not added due to inconsistency of various matching scores.
target coord[2]=[6, 80, 33] around subject [6, 80, 33]: ...... not added due to inconsistency of various matching scores.
target coord[3]=[68, 58, 56] around subject [68, 58, 56]: target [56][58][68] -> subject[66][58][72]
target coord[4]=[121, 203, 67] around subject [121, 203, 67]: target [67][203][121] -> subject[71][198][111]
target coord[5]=[226, 145, 67] around subject [226, 145, 67]: ...... not added due to inconsistency of various matching scores.
target coord[6]=[87, 184, 20] around subject [87, 184, 20]: ...... not added due to inconsistency of various matching scores.
target coord[7]=[151, 96, 72] around subject [151, 96, 72]: target [72][96][151] -> subject[77][103][159]
target coord[8]=[23, 108, 25] around subject [23, 108, 25]: ...... not added due to inconsistency of various matching scores.
target coord[9]=[49, 198, 40] around subject [49, 198, 40]: target [40][198][49] -> subject[40][179][43]
target coord[10]=[121, 145, 26] around subject [121, 145, 26]: ...... not added due to inconsistency of various matching scores.
target coord[11]=[31, 112, 40] around subject [31, 112, 40]: ...... not added due to inconsistency of various matching scores.
target coord[12]=[29, 70, 63] around subject [29, 70, 63]: target [63][70][29] -> subject[69][60][27]
target coord[13]=[86, 230, 58] around subject [86, 230, 58]: target [58][230][86] -> subject[57][219][85]
target coord[14]=[6, 142, 77] around subject [6, 142, 77]: target [77][142][6] -> subject[81][136][1]
target coord[15]=[166, 197, 34] around subject [166, 197, 34]: target [34][197][166] -> subject[35][188][162]
target coord[16]=[78, 85, 34] around subject [78, 85, 34]: target [34][85][78] -> subject[43][84][84]
target coord[17]=[198, 81, 69] around subject [198, 81, 69]: target [69][81][198] -> subject[73][79][201]
target coord[18]=[13, 240, 55] around subject [13, 240, 55]: ...... not added due to inconsistency of various matching scores.
target coord[19]=[89, 170, 44] around subject [89, 170, 44]: target [44][170][89] -> subject[48][152][88]
target coord[20]=[69, 123, 46] around subject [69, 123, 46]: target [46][123][69] -> subject[52][108][71]
target coord[21]=[76, 125, 36] around subject [76, 125, 36]: ...... not added due to inconsistency of various matching scores.
target coord[22]=[31, 116, 39] around subject [31, 116, 39]: ...... not added due to inconsistency of various matching scores.
target coord[23]=[170, 200, 36] around subject [170, 200, 36]: ...... not added due to inconsistency of various matching scores.
target coord[24]=[77, 84, 36] around subject [77, 84, 36]: ...... not added due to inconsistency of various matching scores.
target coord[25]=[74, 82, 74] around subject [74, 82, 74]: target [74][82][74] -> subject[84][81][77]
target coord[26]=[147, 208, 74] around subject [147, 208, 74]: target [74][208][147] -> subject[77][204][138]
target coord[27]=[60, 113, 74] around subject [60, 113, 74]: target [74][113][60] -> subject[83][114][60]
target coord[28]=[66, 63, 53] around subject [66, 63, 53]: target [53][63][66] -> subject[63][62][71]
target coord[29]=[197, 195, 59] around subject [197, 195, 59]: target [59][195][197] -> subject[61][188][190]
target coord[30]=[137, 206, 59] around subject [137, 206, 59]: target [59][206][137] -> subject[64][199][128]
target coord[31]=[172, 202, 59] around subject [172, 202, 59]: target [59][202][172] -> subject[63][197][168]
target coord[32]=[104, 191, 77] around subject [104, 191, 77]: ...... not added due to inconsistency of various matching scores.
target coord[33]=[83, 152, 81] around subject [83, 152, 81]: ...... not added due to inconsistency of various matching scores.
target coord[34]=[76, 169, 81] around subject [76, 169, 81]: target [81][169][76] -> subject[85][164][67]
target coord[35]=[46, 179, 76] around subject [46, 179, 76]: ...... not added due to inconsistency of various matching scores.
target coord[36]=[89, 145, 49] around subject [89, 145, 49]: target [49][145][89] -> subject[55][125][87]
target coord[37]=[73, 146, 49] around subject [73, 146, 49]: ...... not added due to inconsistency of various matching scores.
target coord[38]=[30, 73, 55] around subject [30, 73, 55]: ...... not added due to inconsistency of various matching scores.
target coord[39]=[12, 147, 38] around subject [12, 147, 38]: target [38][147][12] -> subject[36][141][8]
target coord[40]=[48, 197, 39] around subject [48, 197, 39]: target [39][197][48] -> subject[38][178][41]
target coord[41]=[48, 221, 39] around subject [48, 221, 39]: target [39][221][48] -> subject[42][208][47]
target coord[42]=[12, 214, 39] around subject [12, 214, 39]: ...... not added due to inconsistency of various matching scores.
target coord[43]=[34, 235, 39] around subject [34, 235, 39]: ...... not added due to inconsistency of various matching scores.
target coord[44]=[47, 116, 54] around subject [47, 116, 54]: target [54][116][47] -> subject[58][105][40]
target coord[45]=[42, 221, 54] around subject [42, 221, 54]: target [54][221][42] -> subject[54][212][39]
target coord[46]=[11, 148, 54] around subject [11, 148, 54]: target [54][148][11] -> subject[54][142][7]
target coord[47]=[77, 176, 54] around subject [77, 176, 54]: ...... not added due to inconsistency of various matching scores.
target coord[48]=[27, 205, 54] around subject [27, 205, 54]: target [54][205][27] -> subject[53][197][22]
target coord[49]=[84, 238, 54] around subject [84, 238, 54]: ...... not added due to inconsistency of various matching scores.
target coord[50]=[92, 112, 45] around subject [92, 112, 45]: target [45][112][92] -> subject[53][111][99]
target coord[51]=[137, 184, 45] around subject [137, 184, 45]: target [45][184][137] -> subject[50][176][128]
target coord[52]=[121, 189, 45] around subject [121, 189, 45]: ...... not added due to inconsistency of various matching scores.
target coord[53]=[178, 135, 71] around subject [178, 135, 71]: ...... not added due to inconsistency of various matching scores.
target coord[54]=[178, 183, 69] around subject [178, 183, 69]: ...... not added due to inconsistency of various matching scores.
target coord[55]=[81, 156, 26] around subject [81, 156, 26]: ...... not added due to inconsistency of various matching scores.
target coord[56]=[30, 191, 26] around subject [30, 191, 26]: ...... not added due to inconsistency of various matching scores.
target coord[57]=[33, 234, 26] around subject [33, 234, 26]: target [26][234][33] -> subject[17][238][13]
target coord[58]=[13, 179, 26] around subject [13, 179, 26]: target [26][179][13] -> subject[17][161][2]
target coord[59]=[29, 146, 22] around subject [29, 146, 22]: ...... not added due to inconsistency of various matching scores.
target coord[60]=[18, 226, 18] around subject [18, 226, 18]: ...... not added due to inconsistency of various matching scores.
target coord[61]=[9, 185, 12] around subject [9, 185, 12]: target [12][185][9] -> subject[4][169][3]
target coord[62]=[13, 231, 12] around subject [13, 231, 12]: target [12][231][13] -> subject[4][228][0]
target coord[63]=[23, 107, 29] around subject [23, 107, 29]: ...... not added due to inconsistency of various matching scores.
target coord[64]=[71, 124, 29] around subject [71, 124, 29]: target [29][124][71] -> subject[19][138][76]
(1). normalize the point cloud
(2). estimate the initial affine matrix from initial matching using RANSAC
0,
( 0). err_invp_min=5.313598
( 3). err_invp_min=5.036110
5,
( 9). err_invp_min=4.519104
10, 15, 20, 25,
( 29). err_invp_min=4.481841
30, 35, 40,
( 43). err_invp_min=4.087120
45,
50, 55,
( 56). err_invp_min=3.705978
60, 65, 70, 75, 80, 85,
( 88). err_invp_min=3.688620
90, 95,
100, 105, 110, 115, 120, 125, 130, 135, 140, 145,
150, 155, 160, 165, 170, 175, 180, 185, 190, 195,
200, 205, 210, 215, 220, 225, 230, 235, 240, 245,
250, 255, 260, 265, 270, 275, 280, 285, 290, 295,
300, 305, 310, 315, 320, 325, 330, 335, 340, 345,
350, 355, 360, 365, 370, 375, 380,
( 381). err_invp_min=3.660280
385, 390, 395,
400, 405, 410, 415, 420, 425, 430, 435, 440, 445,
450, 455, 460, 465, 470, 475, 480, 485, 490, 495,
500, 505, 510, 515, 520, 525, 530, 535, 540, 545,
550, 555, 560, 565, 570, 575, 580, 585, 590, 595,
600, 605, 610, 615, 620, 625, 630, 635, 640, 645,
650, 655, 660, 665, 670, 675, 680, 685, 690, 695,
700, 705, 710, 715, 720, 725, 730, 735, 740, 745,
750, 755, 760, 765, 770, 775, 780, 785, 790, 795,
800, 805, 810, 815, 820, 825, 830, 835, 840, 845,
850, 855, 860, 865, 870, 875, 880, 885, 890, 895,
900, 905, 910, 915, 920, 925, 930, 935, 940, 945,
950, 955, 960, 965, 970, 975, 980, 985, 990, 995,
(3). kill the wrong matches by comparing the distance between A and the corresponding B_invp
(4). de-normalization and get arr_2_invp!
kill 4 pairs, 32 pairs left!
angle12=12.064 [tedge len=23.622 e1=24.434, e2=46.957] - drop this plane
angle13=8.083 [tedge len=6.164 e1=41.400, e2=38.962] - drop this plane
angle13=6.596 [tedge len=6.164 e1=36.235, e2=31.448] - drop this plane
angle13=11.578 [tedge len=6.164 e1=30.594, e2=29.428] - drop this plane
angle13=1.975 [tedge len=1.732 e1=48.990, e2=49.346] - drop this plane
angle12=3.519 [tedge len=1.732 e1=24.000, e2=23.043] - drop this plane
angle12=2.685 [tedge len=1.732 e1=28.931, e2=27.821] - drop this plane
angle12=3.675 [tedge len=1.732 e1=27.019, e2=27.000] - drop this plane
angle12=0.907 [tedge len=1.732 e1=41.449, e2=43.046] - drop this plane
angle12=160.162 [tedge len=39.774 e1=16.062, e2=24.290] - drop this plane
angle13=18.892 [tedge len=16.062 e1=49.417, e2=48.166] - drop this plane
angle23=14.836 [tedge len=15.748 e1=46.141, e2=34.191] - drop this plane
angle23=17.702 [tedge len=15.748 e1=48.929, e2=41.449] - drop this plane
angle23=16.322 [tedge len=15.748 e1=49.880, e2=40.694] - drop this plane
=============================
cc[1]=13.548 target=[87,138,43] subject=[87,122,49]
cc[2]=6.050 target=[68,58,56] subject=[72,58,66]
cc[3]=24.096 target=[121,203,67] subject=[111,198,71]
cc[4]=46.566 target=[151,96,72] subject=[159,103,77]
cc[5]=31.145 target=[49,198,40] subject=[43,179,40]
cc[6]=43.801 target=[29,70,63] subject=[27,60,69]
cc[7]=9.623 target=[86,230,58] subject=[85,219,57]
cc[8]=29.279 target=[6,142,77] subject=[1,136,81]
cc[9]=39.209 target=[166,197,34] subject=[162,188,35]
cc[10]=0.000 target=[78,85,34] subject=[84,84,43]
cc[11]=76.491 target=[198,81,69] subject=[201,79,73]
cc[12]=13.102 target=[89,170,44] subject=[88,152,48]
cc[13]=15.982 target=[69,123,46] subject=[71,108,52]
cc[14]=40.400 target=[74,82,74] subject=[77,81,84]
cc[15]=31.833 target=[147,208,74] subject=[138,204,77]
cc[16]=0.000 target=[60,113,74] subject=[60,114,83]
cc[17]=7.052 target=[66,63,53] subject=[71,62,63]
cc[18]=48.946 target=[197,195,59] subject=[190,188,61]
cc[19]=25.529 target=[137,206,59] subject=[128,199,64]
cc[20]=42.054 target=[172,202,59] subject=[168,197,63]
cc[21]=0.000 target=[76,169,81] subject=[67,164,85]
cc[22]=50.794 target=[12,147,38] subject=[8,141,36]
cc[23]=30.009 target=[48,197,39] subject=[41,178,38]
cc[24]=51.661 target=[48,221,39] subject=[47,208,42]
cc[25]=20.506 target=[47,116,54] subject=[40,105,58]
cc[26]=50.273 target=[42,221,54] subject=[39,212,54]
cc[27]=21.883 target=[11,148,54] subject=[7,142,54]
cc[28]=44.135 target=[27,205,54] subject=[22,197,53]
cc[29]=8.767 target=[92,112,45] subject=[99,111,53]
cc[30]=31.467 target=[137,184,45] subject=[128,176,50]
cc[31]=71.150 target=[13,179,26] subject=[2,161,17]
cc[32]=90.935 target=[9,185,12] subject=[3,169,4]
Overall mean=31.759 std=22.562
-------------------- Finished detecting the best matching points. Now compute displacement field. -------
Prepare save the matching quality record file [t21_256.tif_matching_quality.csv]
method_inconsistency= 0.5077, model_violation=31.7590
Now save to matching point file of subject to [t21_256.tif_subject.csv]
Now save to matching point file of target to [t21_256.tif_target.csv]
---------------------------------
n=0 x=[87.000 -> 87.000] y=[138.000 -> 122.000] z=[43.000 -> 49.000]
n=1 x=[68.000 -> 72.000] y=[58.000 -> 58.000] z=[56.000 -> 66.000]
n=2 x=[121.000 -> 111.000] y=[203.000 -> 198.000] z=[67.000 -> 71.000]
n=3 x=[151.000 -> 159.000] y=[96.000 -> 103.000] z=[72.000 -> 77.000]
n=4 x=[49.000 -> 43.000] y=[198.000 -> 179.000] z=[40.000 -> 40.000]
n=5 x=[29.000 -> 27.000] y=[70.000 -> 60.000] z=[63.000 -> 69.000]
n=6 x=[86.000 -> 85.000] y=[230.000 -> 219.000] z=[58.000 -> 57.000]
n=7 x=[6.000 -> 1.000] y=[142.000 -> 136.000] z=[77.000 -> 81.000]
n=8 x=[166.000 -> 162.000] y=[197.000 -> 188.000] z=[34.000 -> 35.000]
n=9 x=[78.000 -> 84.000] y=[85.000 -> 84.000] z=[34.000 -> 43.000]
n=10 x=[198.000 -> 201.000] y=[81.000 -> 79.000] z=[69.000 -> 73.000]
n=11 x=[89.000 -> 88.000] y=[170.000 -> 152.000] z=[44.000 -> 48.000]
n=12 x=[69.000 -> 71.000] y=[123.000 -> 108.000] z=[46.000 -> 52.000]
n=13 x=[74.000 -> 77.000] y=[82.000 -> 81.000] z=[74.000 -> 84.000]
n=14 x=[147.000 -> 138.000] y=[208.000 -> 204.000] z=[74.000 -> 77.000]
n=15 x=[60.000 -> 60.000] y=[113.000 -> 114.000] z=[74.000 -> 83.000]
n=16 x=[66.000 -> 71.000] y=[63.000 -> 62.000] z=[53.000 -> 63.000]
n=17 x=[197.000 -> 190.000] y=[195.000 -> 188.000] z=[59.000 -> 61.000]
n=18 x=[137.000 -> 128.000] y=[206.000 -> 199.000] z=[59.000 -> 64.000]
n=19 x=[172.000 -> 168.000] y=[202.000 -> 197.000] z=[59.000 -> 63.000]
n=20 x=[76.000 -> 67.000] y=[169.000 -> 164.000] z=[81.000 -> 85.000]
n=21 x=[12.000 -> 8.000] y=[147.000 -> 141.000] z=[38.000 -> 36.000]
n=22 x=[48.000 -> 41.000] y=[197.000 -> 178.000] z=[39.000 -> 38.000]
n=23 x=[48.000 -> 47.000] y=[221.000 -> 208.000] z=[39.000 -> 42.000]
n=24 x=[47.000 -> 40.000] y=[116.000 -> 105.000] z=[54.000 -> 58.000]
n=25 x=[42.000 -> 39.000] y=[221.000 -> 212.000] z=[54.000 -> 54.000]
n=26 x=[11.000 -> 7.000] y=[148.000 -> 142.000] z=[54.000 -> 54.000]
n=27 x=[27.000 -> 22.000] y=[205.000 -> 197.000] z=[54.000 -> 53.000]
n=28 x=[92.000 -> 99.000] y=[112.000 -> 111.000] z=[45.000 -> 53.000]
n=29 x=[137.000 -> 128.000] y=[184.000 -> 176.000] z=[45.000 -> 50.000]
n=30 x=[13.000 -> 2.000] y=[179.000 -> 161.000] z=[26.000 -> 17.000]
n=31 x=[9.000 -> 3.000] y=[185.000 -> 169.000] z=[12.000 -> 4.000]
#################################
-------------------- Now compute the distances of pixels to the mapping points. -------
z=0 z=1 z=2 z=3 z=4 z=5 z=6 z=7 z=8 z=9 z=10 z=11 z=12 z=13 z=14 z=15 z=16 z=17 z=18 z=19 z=20 z=21 z=22 z=23 z=24 z=25 z=26 z=27 z=28 z=29 z=30 z=31 z=32
-------------------- Now interpolate the DF using linear method. -------
in ApplyDFToChannel(), the subject image data normalizer=255.000
Finish warping the 0th channel.
Done: warping.
Succeed to warp using the DF to the specified channel(s).
The current input file has the surfix [v3draw]
The data is not with a TIF surfix, -- now this program assumes it is RAW format defined by Hanchuan Peng.
size of [V3DLONG]=[8], [V3DLONG]=[8] [int]=[4], [short int]=[2], [double]=[8], [float]=[4]
Succeed to save to file test1_999_DF_sx.v3draw
The current input file has the surfix [v3draw]
The data is not with a TIF surfix, -- now this program assumes it is RAW format defined by Hanchuan Peng.
size of [V3DLONG]=[8], [V3DLONG]=[8] [int]=[4], [short int]=[2], [double]=[8], [float]=[4]
Succeed to save to file test1_999_DF_sy.v3draw
The current input file has the surfix [v3draw]
The data is not with a TIF surfix, -- now this program assumes it is RAW format defined by Hanchuan Peng.
size of [V3DLONG]=[8], [V3DLONG]=[8] [int]=[4], [short int]=[2], [double]=[8], [float]=[4]
Succeed to save to file test1_999_DF_sz.v3draw
Now save the output/warped image [pointer=0x811d250] datatype_warped=1 sz_warped=[256, 256, 108, 1]
The current input file has the surfix [tif]
The warped image has been saved to the file [t21_256.tif].
Originally posted by Hanchuan Peng:
the displacement
fields for separate direction cannpt be all the same (unless the
input data do not have any deformation).
You can tryto add a "-F test1" string in my example program on the web page. You should have three output files. If you load them in V3D, you will see them all different.
-hanchuan
Originally posted by Thomas Templier:
You can tryto add a "-F test1" string in my example program on the web page. You should have three output files. If you load them in V3D, you will see them all different.
-hanchuan
Originally posted by Thomas Templier:
I've opened several DF in V3D and they are all
the same. Rather dark at the beginning of the stack and bright at
the end, and a jump in the last slices. It seems that there might
be a small offset somewhere in the header maybe. What do you think
of it ?
You said that it is saved in 32 bit float, it means packed in packets of 32 bytes right ?
Best Regards
Thomas
You said that it is saved in 32 bit float, it means packed in packets of 32 bytes right ?
Best Regards
Thomas
Threaded View
Title | Author | Date |
---|---|---|
Fernando Amat | Jul 16, 2010 | |
Hanchuan Peng | Jul 17, 2010 | |
John Roberts | May 24, 2012 | |
Thomas Templier | Aug 9, 2011 | |
Hanchuan Peng | Aug 9, 2011 | |
Thomas Templier | Aug 9, 2011 | |
Thomas Templier | Aug 10, 2011 | |
Hanchuan Peng | Aug 10, 2011 | |
Thomas Templier | Aug 10, 2011 | |
Hanchuan Peng | Aug 10, 2011 | |
Thomas Templier | Aug 10, 2011 | |
Hanchuan Peng | Aug 10, 2011 | |
Thomas Templier | Aug 10, 2011 | |
Hanchuan Peng | Aug 10, 2011 | |
Thomas Templier | Aug 10, 2011 | |
Hanchuan Peng | Aug 10, 2011 | |
Thomas Templier | Aug 10, 2011 | |
Hanchuan Peng | Aug 10, 2011 | |
Thomas Templier | Aug 11, 2011 | |