From 3ede91ddd835ef6f6eaf9e72956be7c6ebd69ad4 Mon Sep 17 00:00:00 2001 From: Juan Prieto Date: Tue, 9 Feb 2010 21:27:50 +0000 Subject: [PATCH] Parser Osirix --- CMakeLists.txt | 3 +- appli/wxContourGUIExample/CMakeLists.txt | 2 +- bbtk/CMakeLists.txt | 2 + data/Icons/Import.png | Bin 0 -> 1347 bytes data/XML/osirixschema.xsd | 67 + data/XML/testOsirix.xml | 1975 +++++++++++++++++ lib/CMakeLists.txt | 1 - .../interfIOMenu.cxx | 9 + .../interfIOMenu.h | 2 + .../interfMainPanel.cxx | 4 + .../interfMainPanel.h | 1 + .../wxContourMainFrame.cxx | 29 +- .../wxContourMainFrame.h | 3 +- .../CMakeLists.txt | 14 +- .../KernelManagerContour.cxx | 27 + .../KernelManagerContour.h | 7 +- .../ParserOsirix/OsirixParser.cxx | 507 +++++ .../ParserOsirix/OsirixParser.h | 163 ++ .../ParserOsirix/ParserOsirix.cmake | 23 + 19 files changed, 2828 insertions(+), 11 deletions(-) create mode 100644 data/Icons/Import.png create mode 100644 data/XML/osirixschema.xsd create mode 100644 data/XML/testOsirix.xml create mode 100644 lib/kernel_ManagerContour_NDimensions/ParserOsirix/OsirixParser.cxx create mode 100644 lib/kernel_ManagerContour_NDimensions/ParserOsirix/OsirixParser.h create mode 100644 lib/kernel_ManagerContour_NDimensions/ParserOsirix/ParserOsirix.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 7f0be56..3cbafed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,6 +47,7 @@ SET(USE_WXWIDGETS ON) SET(USE_VTK ON) SET(USE_ITK ON) SET(USE_BOOST ON) +SET(USE_XERCES ON) CREA_FIND_AND_USE_LIBRARIES() @@ -67,7 +68,7 @@ ENDIF(WIN32) INCLUDE_DIRECTORIES(lib/Interface_ManagerContour_NDimensions) INCLUDE_DIRECTORIES(lib/Interface_Icons_NDimensions) INCLUDE_DIRECTORIES(lib/kernel_ManagerContour_NDimensions) - +INCLUDE_DIRECTORIES(lib/kernel_ManagerContour_NDimensions/ParserOsirix) SUBDIRS(lib) SUBDIRS(appli) diff --git a/appli/wxContourGUIExample/CMakeLists.txt b/appli/wxContourGUIExample/CMakeLists.txt index 6ba1b98..2213763 100644 --- a/appli/wxContourGUIExample/CMakeLists.txt +++ b/appli/wxContourGUIExample/CMakeLists.txt @@ -19,7 +19,7 @@ TARGET_LINK_LIBRARIES( wxContourGUIExample ${creaImageIO2_LIBRARIES} Interface_Icons_NDimensions_lib Interface_ManagerContour_NDimensions_lib - kernel_ManagerContour_NDimensions_lib + kernel_ManagerContour_NDimensions_lib ) diff --git a/bbtk/CMakeLists.txt b/bbtk/CMakeLists.txt index 3c8c76d..a8408ca 100644 --- a/bbtk/CMakeLists.txt +++ b/bbtk/CMakeLists.txt @@ -132,8 +132,10 @@ SET(${BBTK_PACKAGE_NAME}_LIBS Interface_ManagerContour_NDimensions_lib Interface_Icons_NDimensions_lib kernel_ManagerContour_NDimensions_lib + kernelParserOsirix ${creaEnvironment_LIBRARIES} ${creaMaracasVisu_LIBRARIES} + ) #=========================================================================== diff --git a/data/Icons/Import.png b/data/Icons/Import.png new file mode 100644 index 0000000000000000000000000000000000000000..788aec7b5b725367c70c03b3f81520f6a6526393 GIT binary patch literal 1347 zcmV-J1-$x+P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2igJ! z4i*VrwHCqv00hHHL_t(o!|j+&Y*bYg$A9O&`RII4i&PS0pz2CugKkWb1Q!+z!a@)> zbVG;<>`90lT)J@O#-x&z7-yj-g0Uttn!uu_4K;#MpnSBJ0s*mwwnOLhy?2ibUfY>k zp{3JMqi1q6ckX@X=0E>)?)i8^m5hyztp&CNA?hUIa99osGSa?4tAo z)jvdJI2a5Hb(BaXLa|uX_V)JIve|6kV)d;m_Ew9CIF6&0N`-ojQmI5Dk&s9v(z|Wj zwjBUFckWy~KoL=6j6W6XH2{*yB#n)Y8jr`n*|lp|+wtSa>FDTK96(i_Ik29hszjqv zQmK@r(`n-I_>X({?%k5fWZ1WF-@*Y-AGRDL91atWMoAgww1d!hgV9LHf` zU;twbB7$XESeAt`h7B7wtZQm&8d*@7SuP0%gS57`&b#M%UK)5bKviWW%KrfWI{^JG zvf{*Ih0BU(@ZaTw%Tg?$2sVz%F>alwS=&JL@fch#7Vk5}Q1ny0N`+>3BSyWIVPa96 zk?;vd+-@euuMoG^q5(zGCwoaO0!+ybE(N-{lkcbOOdw+8sZg@UF}O3e$~`Wu>KuH1 zO|||+@%QrKm#&Y0@Jq{VHFNdq)%sL3Dh%7*+~gEv`3oqse>`L-cqZ9a!=U1pVAgyJ zsCo@&hCfSuw3&RMs;XF;IkCv|2P2{H7%86Oe(5%r6#$(LwXQqGN2sehMb;)++|^1Xh90LzsqmjrN?JkQ(lkLk@H<%aVU z0m9THnu>p$YXCmZE%xvTk>HKkdt560z?otOqi%ICwlazZM@zgA+RPgJMS7;Xxa|&L zVb>SnQsW?aG?3=a#9{jLUvjZ@8V?7lVN>yH^RQZCi_FWoxmVK{_xASIwJ*+l<8ivXipr#Fbi_9+`s2y`Sg`J=_vQf_Ort^0DF3R>fE>s7Q)ZPZ#h>ui6u5E zyP0>=M|?l^vxWp)+cv%W+g$B;yI;Mok#>4w!;cz~8qQ(`2ct2TTEuZ+fGu1t90oC;a(cRlNmV5s`ubWHK3i0G6uSA` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/XML/testOsirix.xml b/data/XML/testOsirix.xml new file mode 100644 index 0000000..c5fd9d1 --- /dev/null +++ b/data/XML/testOsirix.xml @@ -0,0 +1,1975 @@ + + + + + Images + + + ImageIndex + 6 + NumberOfROIs + 1 + ROIs + + + Area + 0.2282261848449707 + Center + (1.829798, 3.995818, -36.073521) + Dev + 36.505741119384766 + IndexInImage + 0 + Max + 301 + Mean + 177.32608032226562 + Min + 98 + Name + 2 + NumberOfPoints + 10 + Point_mm + + (2.214880, -0.486380, -36.073521) + (4.908628, 3.123778, -36.073521) + (6.178946, 5.453462, -36.073521) + (2.790661, 5.877680, -36.073521) + (-1.096838, 6.399554, -36.073521) + (-0.533562, 5.570656, -36.073521) + (0.028939, 4.742533, -36.073521) + (0.673468, 4.329247, -36.073521) + (1.318009, 3.915960, -36.073521) + (1.814885, 1.031596, -36.073521) + + Point_px + + (139.056580, 138.696594) + (142.504578, 143.317596) + (144.130585, 146.299591) + (139.793579, 146.842590) + (134.817581, 147.510590) + (135.538574, 146.449600) + (136.258575, 145.389603) + (137.083572, 144.860596) + (137.908585, 144.331589) + (138.544586, 140.639603) + + Total + 8157 + Type + 15 + + + + + ImageIndex + 7 + NumberOfROIs + 4 + ROIs + + + Area + 1.5463262796401978 + Center + (1.420660, -8.016580, -33.073521) + Dev + 43.547935485839844 + IndexInImage + 0 + Max + 293 + Mean + 157.74192810058594 + Min + 69 + Name + b2 + NumberOfPoints + 15 + Point_mm + + (0.248475, -18.055910, -33.073521) + (-1.869493, -15.726220, -33.073521) + (-3.139811, -12.972319, -33.073521) + (-3.774958, -10.642630, -33.073521) + (-4.199188, -8.101218, -33.073521) + (-4.199188, -5.771535, -33.073521) + (-3.139811, -3.441852, -33.073521) + (-0.810115, -2.171534, -33.073521) + (1.942999, -1.112157, -33.073521) + (4.272695, -1.535600, -33.073521) + (6.602378, -3.230124, -33.073521) + (7.661755, -5.559820, -33.073521) + (7.873471, -8.101218, -33.073521) + (7.873471, -10.430908, -33.073521) + (5.967219, -13.395756, -33.073521) + + Point_px + + (136.539581, 116.207596) + (133.828583, 119.189598) + (132.202576, 122.714592) + (131.389587, 125.696594) + (130.846573, 128.949600) + (130.846573, 131.931595) + (132.202576, 134.913589) + (135.184586, 136.539597) + (138.708572, 137.895599) + (141.690582, 137.353592) + (144.672577, 135.184601) + (146.028580, 132.202591) + (146.299576, 128.949600) + (146.299576, 125.967598) + (143.859573, 122.172592) + + Total + 44010 + Type + 15 + + + Area + 2.3100674152374268 + Center + (-16.497385, -10.622685, -33.073521) + Dev + 53.491893768310547 + IndexInImage + 1 + Max + 386 + Mean + 155.01690673828125 + Min + 38 + Name + b1 + NumberOfPoints + 17 + Point_mm + + (-9.493713, -8.524662, -33.073521) + (-8.858554, -11.490285, -33.073521) + (-9.281998, -13.819974, -33.073521) + (-9.917150, -16.784817, -33.073521) + (-11.364804, -20.997314, -33.073521) + (-14.150743, -20.873098, -33.073521) + (-16.392933, -20.117628, -33.073521) + (-19.613247, -17.303568, -33.073521) + (-20.295279, -14.878565, -33.073521) + (-20.930431, -12.548882, -33.073521) + (-22.412466, -10.007470, -33.073521) + (-22.412466, -7.677787, -33.073521) + (-22.200745, -5.348092, -33.073521) + (-21.142153, -2.806693, -33.073521) + (-19.659340, -0.477010, -33.073521) + (-17.329649, 1.429242, -33.073521) + (-14.999961, 1.640970, -33.073521) + + Point_px + + (124.069580, 128.407593) + (124.882584, 124.611595) + (124.340576, 121.629593) + (123.527580, 117.834595) + (121.674583, 112.442596) + (118.108582, 112.601593) + (115.238579, 113.568596) + (111.116577, 117.170593) + (110.243576, 120.274597) + (109.430580, 123.256592) + (107.533577, 126.509598) + (107.533577, 129.491592) + (107.804581, 132.473602) + (109.159576, 135.726593) + (111.057579, 138.708588) + (114.039581, 141.148590) + (117.021584, 141.419601) + + Total + 64177 + Type + 15 + + + Area + 0.28483271598815918 + Center + (0.964303, 5.030221, -33.073521) + Dev + 39.861442565917969 + IndexInImage + 2 + Max + 271 + Mean + 178.21875 + Min + 93 + Name + 2 + NumberOfPoints + 8 + Point_mm + + (5.756290, 2.488619, -33.073521) + (3.426595, 1.853460, -33.073521) + (1.096911, 3.123778, -33.073521) + (-1.232772, 4.394871, -33.073521) + (-2.715592, 6.724555, -33.073521) + (-2.080433, 8.842523, -33.073521) + (0.249250, 7.147998, -33.073521) + (3.214104, 5.665964, -33.073521) + + Point_px + + (143.589584, 142.504593) + (140.607574, 141.691589) + (137.625580, 143.317596) + (134.643585, 144.944595) + (132.745575, 147.926590) + (133.558578, 150.637589) + (136.540573, 148.468597) + (140.335587, 146.571594) + + Total + 11406 + Type + 15 + + + Area + 0.20062923431396484 + Center + (-13.940721, 7.536417, -33.073521) + Dev + 52.268970489501953 + IndexInImage + 3 + Max + 381 + Mean + 279.82925415039062 + Min + 200 + Name + 1 + NumberOfPoints + 6 + Point_mm + + (-13.940589, 9.477681, -33.073521) + (-11.610900, 9.477681, -33.073521) + (-11.399184, 7.147998, -33.073521) + (-13.728868, 5.665964, -33.073521) + (-15.846841, 5.453462, -33.073521) + (-17.117933, 7.995647, -33.073521) + + Point_px + + (118.377579, 151.450592) + (121.359581, 151.450592) + (121.630577, 148.468597) + (118.648582, 146.571594) + (115.937576, 146.299591) + (114.310577, 149.553589) + + Total + 11473 + Type + 15 + + + + + ImageIndex + 8 + NumberOfROIs + 4 + ROIs + + + Area + 2.1033346652984619 + Center + (1.507123, -10.779810, -30.073523) + Dev + 37.454299926757812 + IndexInImage + 0 + Max + 282 + Mean + 151.89305114746094 + Min + 65 + Name + b2 + NumberOfPoints + 17 + Point_mm + + (10.203166, -11.066067, -30.073523) + (9.567221, -13.395756, -30.073523) + (7.661755, -15.937942, -30.073523) + (5.332072, -17.843412, -30.073523) + (2.790661, -19.537943, -30.073523) + (0.248475, -20.173096, -30.073523) + (-2.081208, -18.691069, -30.073523) + (-3.139811, -16.149658, -30.073523) + (-3.986685, -13.819974, -30.073523) + (-3.986685, -11.490285, -30.073523) + (-3.351526, -8.948880, -30.073523) + (-2.716367, -6.406694, -30.073523) + (-1.869493, -4.076999, -30.073523) + (-0.810115, -1.747316, -30.073523) + (1.519568, -1.535600, -30.073523) + (3.849251, -0.900441, -30.073523) + (6.390662, -1.535600, -30.073523) + + Point_px + + (149.281586, 125.154594) + (148.467575, 122.172592) + (146.028580, 118.918594) + (143.046585, 116.479591) + (139.793579, 114.310593) + (136.539581, 113.497597) + (133.557587, 115.394592) + (132.202576, 118.647598) + (131.118576, 121.629593) + (131.118576, 124.611595) + (131.931580, 127.864594) + (132.744583, 131.118591) + (133.828583, 134.100601) + (135.184586, 137.082596) + (138.166580, 137.353592) + (141.148575, 138.166595) + (144.401581, 137.353592) + + Total + 56808 + Type + 15 + + + Area + 2.4026899337768555 + Center + (-15.647273, -11.466372, -30.073523) + Dev + 57.220077514648438 + IndexInImage + 1 + Max + 452 + Mean + 172.07493591308594 + Min + 44 + Name + b1 + NumberOfPoints + 18 + Point_mm + + (-8.646058, -6.194967, -30.073523) + (-8.646058, -8.312946, -30.073523) + (-8.434336, -10.430908, -30.073523) + (-8.434336, -12.760597, -30.073523) + (-8.858554, -15.302002, -30.073523) + (-9.493713, -17.631691, -30.073523) + (-11.823402, -19.537943, -30.073523) + (-13.941370, -20.809036, -30.073523) + (-16.482775, -20.385599, -30.073523) + (-18.389027, -18.055910, -30.073523) + (-19.871056, -15.513723, -30.073523) + (-20.718716, -13.184034, -30.073523) + (-21.142153, -10.642630, -30.073523) + (-21.142153, -8.312946, -30.073523) + (-21.353868, -5.983251, -30.073523) + (-22.200745, -3.653568, -30.073523) + (-21.777308, -1.112157, -30.073523) + (-20.295279, 1.429242, -30.073523) + + Point_px + + (125.154579, 131.389603) + (125.154579, 128.678589) + (125.425583, 125.967598) + (125.425583, 122.985596) + (124.882584, 119.732597) + (124.069580, 116.750595) + (121.087578, 114.310593) + (118.376579, 112.683594) + (115.123581, 113.225594) + (112.683578, 116.207596) + (110.786583, 119.461594) + (109.701576, 122.443596) + (109.159576, 125.696594) + (109.159576, 128.678589) + (108.888580, 131.660599) + (107.804581, 134.642593) + (108.346581, 137.895599) + (110.243576, 141.148590) + + Total + 73476 + Type + 15 + + + Area + 0.2447277307510376 + Center + (-25.044493, -8.131354, -30.073523) + Dev + 37.539157867431641 + IndexInImage + 2 + Max + 182 + Mean + 109.98148345947266 + Min + 29 + Name + 3 + NumberOfPoints + 7 + Point_mm + + (-23.682777, -6.194967, -30.073523) + (-23.682777, -8.524662, -30.073523) + (-23.682777, -10.854345, -30.073523) + (-24.742149, -12.760597, -30.073523) + (-27.071838, -8.524662, -30.073523) + (-27.071838, -6.194967, -30.073523) + (-25.377308, -3.865283, -30.073523) + + Point_px + + (105.907578, 131.389603) + (105.907578, 128.407593) + (105.907578, 125.425598) + (104.551582, 122.985596) + (101.569580, 128.407593) + (101.569580, 131.389603) + (103.738579, 134.371597) + + Total + 5939 + Type + 15 + + + Area + 0.47897100448608398 + Center + (-14.814220, 7.015771, -30.073523) + Dev + 38.340850830078125 + IndexInImage + 3 + Max + 289 + Mean + 216 + Min + 104 + Name + 1 + NumberOfPoints + 8 + Point_mm + + (-14.364027, 11.172217, -30.073523) + (-12.246059, 8.842523, -30.073523) + (-10.764026, 6.724555, -30.073523) + (-11.610900, 4.394871, -30.073523) + (-13.940589, 4.606587, -30.073523) + (-16.270279, 5.241746, -30.073523) + (-18.388247, 6.512839, -30.073523) + (-20.929651, 8.630807, -30.073523) + + Point_px + + (117.835579, 153.619598) + (120.546577, 150.637589) + (122.443581, 147.926590) + (121.359581, 144.944595) + (118.377579, 145.215591) + (115.395576, 146.028595) + (112.684578, 147.655594) + (109.431580, 150.366592) + + Total + 20952 + Type + 15 + + + + + ImageIndex + 9 + NumberOfROIs + 4 + ROIs + + + Area + 3.3587932586669922 + Center + (4.131658, -6.840616, -27.073523) + Dev + 38.031448364257812 + IndexInImage + 0 + Max + 284 + Mean + 154.08934020996094 + Min + 65 + Name + b2 + NumberOfPoints + 21 + Point_mm + + (0.672693, -19.537943, -27.073523) + (-1.656990, -18.267632, -27.073523) + (-3.351526, -15.937942, -27.073523) + (-4.410903, -13.608253, -27.073523) + (-4.622619, -11.066067, -27.073523) + (-5.046062, -8.524662, -27.073523) + (-4.834335, -5.983251, -27.073523) + (-3.351526, -3.441852, -27.073523) + (-2.292936, -1.112157, -27.073523) + (-0.386684, 1.217526, -27.073523) + (3.002377, 2.276117, -27.073523) + (5.332072, 2.700335, -27.073523) + (7.661755, 2.912063, -27.073523) + (10.203166, 1.429242, -27.073523) + (12.109406, -0.900441, -27.073523) + (12.744565, -3.230124, -27.073523) + (13.168009, -5.771535, -27.073523) + (13.379725, -8.312946, -27.073523) + (13.379725, -10.430908, -27.073523) + (13.379725, -12.760597, -27.073523) + (11.685188, -15.302002, -27.073523) + + Point_px + + (137.082581, 114.310593) + (134.100586, 115.936592) + (131.931580, 118.918594) + (130.575577, 121.900597) + (130.304581, 125.154594) + (129.762573, 128.407593) + (130.033585, 131.660599) + (131.931580, 134.913589) + (133.286575, 137.895599) + (135.726578, 140.877594) + (140.064575, 142.232590) + (143.046585, 142.775589) + (146.028580, 143.046600) + (149.281586, 141.148590) + (151.721573, 138.166595) + (152.534576, 135.184601) + (153.076584, 131.931595) + (153.347580, 128.678589) + (153.347580, 125.967598) + (153.347580, 122.985596) + (151.178574, 119.732597) + + Total + 89680 + Type + 15 + + + Area + 3.0753970146179199 + Center + (-16.869526, -10.679656, -27.073523) + Dev + 51.686145782470703 + IndexInImage + 1 + Max + 342 + Mean + 154.62295532226562 + Min + 40 + Name + b1 + NumberOfPoints + 23 + Point_mm + + (-8.858554, -13.395756, -27.073523) + (-8.646058, -15.726220, -27.073523) + (-8.434336, -18.267632, -27.073523) + (-9.070276, -20.809036, -27.073523) + (-11.611681, -22.079348, -27.073523) + (-13.941370, -22.291063, -27.073523) + (-16.482775, -22.291063, -27.073523) + (-19.235901, -21.655910, -27.073523) + (-21.777308, -20.173096, -27.073523) + (-22.412466, -17.631691, -27.073523) + (-22.624962, -14.878565, -27.073523) + (-22.836683, -12.337160, -27.073523) + (-22.836683, -10.007470, -27.073523) + (-22.836683, -7.677787, -27.073523) + (-22.836683, -5.348092, -27.073523) + (-22.624962, -2.806693, -27.073523) + (-22.200745, -0.477010, -27.073523) + (-20.718716, 1.852685, -27.073523) + (-18.177305, 2.700335, -27.073523) + (-15.847622, 1.429242, -27.073523) + (-13.306211, -0.053566, -27.073523) + (-10.975747, -0.688725, -27.073523) + (-9.705435, -3.018409, -27.073523) + + Point_px + + (124.882584, 122.172592) + (125.154579, 119.189598) + (125.425583, 115.936592) + (124.611580, 112.683594) + (121.358582, 111.057594) + (118.376579, 110.786598) + (115.123581, 110.786598) + (111.599579, 111.599594) + (108.346581, 113.497597) + (107.533577, 116.750595) + (107.261581, 120.274597) + (106.990578, 123.527596) + (106.990578, 126.509598) + (106.990578, 129.491592) + (106.990578, 132.473602) + (107.261581, 135.726593) + (107.804581, 138.708588) + (109.701576, 141.690598) + (112.954582, 142.775589) + (115.936577, 141.148590) + (119.189583, 139.250595) + (122.172577, 138.437592) + (123.798576, 135.455597) + + Total + 84888 + Type + 15 + + + Area + 0.23835599422454834 + Center + (-24.900740, -8.736378, -27.073523) + Dev + 34.793563842773438 + IndexInImage + 2 + Max + 234 + Mean + 140.84906005859375 + Min + 78 + Name + 3 + NumberOfPoints + 8 + Point_mm + + (-23.047619, -6.618410, -27.073523) + (-23.894493, -8.736378, -27.073523) + (-23.894493, -11.066067, -27.073523) + (-24.106997, -13.395756, -27.073523) + (-26.012461, -11.066067, -27.073523) + (-26.224182, -8.736378, -27.073523) + (-27.071838, -6.406694, -27.073523) + (-24.953871, -3.865283, -27.073523) + + Point_px + + (106.720581, 130.847595) + (105.636581, 128.136597) + (105.636581, 125.154594) + (105.364578, 122.172592) + (102.925583, 125.154594) + (102.654579, 128.136597) + (101.569580, 131.118591) + (104.280579, 134.371597) + + Total + 7465 + Type + 15 + + + Area + 0.48890411853790283 + Center + (-15.232550, 7.508308, -27.073523) + Dev + 30.310798645019531 + IndexInImage + 3 + Max + 228 + Mean + 169.27835083007812 + Min + 94 + Name + 1 + NumberOfPoints + 10 + Point_mm + + (-13.093715, 10.537059, -27.073523) + (-11.822621, 8.207376, -27.073523) + (-9.704648, 5.877680, -27.073523) + (-12.034337, 4.818303, -27.073523) + (-14.152305, 5.030030, -27.073523) + (-16.481995, 5.453462, -27.073523) + (-19.023399, 5.877680, -27.073523) + (-21.142153, 7.995647, -27.073523) + (-19.023399, 10.325343, -27.073523) + (-15.846841, 10.960502, -27.073523) + + Point_px + + (119.461578, 152.806595) + (121.088577, 149.824600) + (123.799583, 146.842590) + (120.817581, 145.486588) + (118.106583, 145.757599) + (115.124580, 146.299591) + (111.871582, 146.842590) + (109.159576, 149.553589) + (111.871582, 152.535599) + (115.937576, 153.348602) + + Total + 16420 + Type + 15 + + + + + ImageIndex + 10 + NumberOfROIs + 4 + ROIs + + + Area + 4.2655825614929199 + Center + (3.025539, -8.085626, -24.073523) + Dev + 36.650798797607422 + IndexInImage + 0 + Max + 294 + Mean + 149.45074462890625 + Min + 51 + Name + b2 + NumberOfPoints + 27 + Point_mm + + (8.932074, -16.996532, -24.073523) + (7.873471, -19.326221, -24.073523) + (6.390662, -21.655910, -24.073523) + (4.060979, -22.291063, -24.073523) + (1.731284, -23.350441, -24.073523) + (-0.810115, -23.138725, -24.073523) + (-3.139811, -20.809036, -24.073523) + (-4.410903, -18.479347, -24.073523) + (-4.410903, -16.149658, -24.073523) + (-4.622619, -13.608253, -24.073523) + (-4.622619, -11.066067, -24.073523) + (-4.834335, -8.736378, -24.073523) + (-4.622619, -6.406694, -24.073523) + (-4.199188, -4.289502, -24.073523) + (-3.774958, -1.535600, -24.073523) + (-2.928083, 0.794095, -24.073523) + (-2.081208, 3.335494, -24.073523) + (0.460978, 4.817528, -24.073523) + (3.425820, 5.665189, -24.073523) + (5.755503, 5.453462, -24.073523) + (8.085198, 4.817528, -24.073523) + (10.414882, 3.547210, -24.073523) + (12.109406, 1.217526, -24.073523) + (13.591440, -1.323884, -24.073523) + (14.226599, -3.865283, -24.073523) + (14.862533, -6.406694, -24.073523) + (14.226599, -8.524662, -24.073523) + + Point_px + + (147.654587, 117.563599) + (146.299576, 114.581596) + (144.401581, 111.599594) + (141.419586, 110.786598) + (138.437576, 109.430595) + (135.184586, 109.701591) + (132.202576, 112.683594) + (130.575577, 115.665596) + (130.575577, 118.647598) + (130.304581, 121.900597) + (130.304581, 125.154594) + (130.033585, 128.136597) + (130.304581, 131.118591) + (130.846573, 133.828598) + (131.389587, 137.353592) + (132.473587, 140.335602) + (133.557587, 143.588593) + (136.811584, 145.485596) + (140.606583, 146.570602) + (143.588577, 146.299591) + (146.570587, 145.485596) + (149.552582, 143.859589) + (151.721573, 140.877594) + (153.618576, 137.624588) + (154.431580, 134.371597) + (155.245575, 131.118591) + (154.431580, 128.407593) + + Total + 110743 + Type + 15 + + + Area + 3.4117012023925781 + Center + (-15.211987, -11.683327, -24.073523) + Dev + 43.411251068115234 + IndexInImage + 1 + Max + 323 + Mean + 160.54635620117188 + Min + 26 + Name + b1 + NumberOfPoints + 23 + Point_mm + + (-10.340588, -0.477010, -24.073523) + (-8.858554, -3.018409, -24.073523) + (-7.587461, -5.559820, -24.073523) + (-6.952308, -8.101218, -24.073523) + (-6.316369, -10.430908, -24.073523) + (-6.104653, -12.972319, -24.073523) + (-6.316369, -15.513723, -24.073523) + (-7.164024, -17.843412, -24.073523) + (-8.858554, -20.173096, -24.073523) + (-11.188244, -21.232473, -24.073523) + (-13.517933, -21.655910, -24.073523) + (-15.847622, -22.079348, -24.073523) + (-18.177305, -21.655910, -24.073523) + (-20.506994, -19.326221, -24.073523) + (-21.989029, -16.996532, -24.073523) + (-23.471836, -14.666849, -24.073523) + (-23.895275, -12.337160, -24.073523) + (-23.683559, -9.795754, -24.073523) + (-22.836683, -7.677787, -24.073523) + (-22.200745, -5.348092, -24.073523) + (-21.777308, -3.018409, -24.073523) + (-21.353868, -0.477010, -24.073523) + (-20.930431, 1.640970, -24.073523) + + Point_px + + (122.985580, 138.708588) + (124.882584, 135.455597) + (126.509583, 132.202591) + (127.322578, 128.949600) + (128.136581, 125.967598) + (128.407578, 122.714592) + (128.136581, 119.461594) + (127.051582, 116.479591) + (124.882584, 113.497597) + (121.900581, 112.141594) + (118.918579, 111.599594) + (115.936577, 111.057594) + (112.954582, 111.599594) + (109.972580, 114.581596) + (108.075577, 117.563599) + (106.177582, 120.545593) + (105.635582, 123.527596) + (105.906578, 126.780594) + (106.990578, 129.491592) + (107.804581, 132.473602) + (108.346581, 135.455597) + (108.888580, 138.708588) + (109.430580, 141.419601) + + Total + 96970 + Type + 15 + + + Area + 0.2687603235244751 + Center + (-25.854061, -8.418410, -24.073523) + Dev + 60.533447265625 + IndexInImage + 2 + Max + 360 + Mean + 134.64515686035156 + Min + 33 + Name + 3 + NumberOfPoints + 8 + Point_mm + + (-24.318712, -7.253569, -24.073523) + (-24.318712, -9.371536, -24.073523) + (-24.318712, -11.701220, -24.073523) + (-26.648401, -12.336379, -24.073523) + (-27.706997, -10.006690, -24.073523) + (-27.918713, -7.677001, -24.073523) + (-27.071838, -5.135602, -24.073523) + (-24.530434, -3.865283, -24.073523) + + Point_px + + (105.093582, 130.034592) + (105.093582, 127.323593) + (105.093582, 124.341599) + (102.111580, 123.528595) + (100.756577, 126.510597) + (100.485580, 129.492599) + (101.569580, 132.745590) + (104.822578, 134.371597) + + Total + 8348 + Type + 15 + + + Area + 0.59381723403930664 + Center + (-15.423404, 8.154113, -24.073523) + Dev + 29.573389053344727 + IndexInImage + 3 + Max + 227 + Mean + 158.49565124511719 + Min + 89 + Name + 1 + NumberOfPoints + 12 + Point_mm + + (-13.728868, 10.325343, -24.073523) + (-11.399184, 9.689397, -24.073523) + (-10.340588, 7.571429, -24.073523) + (-10.552310, 5.030030, -24.073523) + (-12.881993, 4.606587, -24.073523) + (-14.999961, 5.030030, -24.073523) + (-17.329649, 5.877680, -24.073523) + (-19.871056, 6.301123, -24.073523) + (-21.564810, 8.630807, -24.073523) + (-19.871056, 10.747999, -24.073523) + (-17.541372, 11.383933, -24.073523) + (-14.999961, 12.655026, -24.073523) + + Point_px + + (118.648582, 152.535599) + (121.630577, 151.721588) + (122.985580, 149.010590) + (122.714577, 145.757599) + (119.732582, 145.215591) + (117.021584, 145.757599) + (114.039581, 146.842590) + (110.786583, 147.384598) + (108.618576, 150.366592) + (110.786583, 153.076599) + (113.768578, 153.890594) + (117.021584, 155.517593) + + Total + 18227 + Type + 15 + + + + + ImageIndex + 11 + NumberOfROIs + 4 + ROIs + + + Area + 4.15179443359375 + Center + (3.022285, -6.467587, -21.073523) + Dev + 40.884113311767578 + IndexInImage + 0 + Max + 307 + Mean + 137.96818542480469 + Min + 43 + Name + b2 + NumberOfPoints + 21 + Point_mm + + (4.272695, -23.350441, -21.073523) + (1.942999, -22.715288, -21.073523) + (-0.598400, -21.444189, -21.073523) + (-2.292936, -19.114506, -21.073523) + (-2.928083, -16.573095, -21.073523) + (-3.139811, -14.243412, -21.073523) + (-3.563242, -11.702006, -21.073523) + (-3.563242, -9.372317, -21.073523) + (-3.563242, -6.406694, -21.073523) + (-3.351526, -3.865283, -21.073523) + (-2.716367, -1.323884, -21.073523) + (-1.445274, 1.005811, -21.073523) + (0.884409, 2.912063, -21.073523) + (3.425820, 4.394084, -21.073523) + (5.755503, 4.605812, -21.073523) + (8.508630, 4.394084, -21.073523) + (10.838313, 3.970653, -21.073523) + (12.744565, 1.640970, -21.073523) + (13.591440, -0.688725, -21.073523) + (14.226599, -3.230124, -21.073523) + (14.439101, -4.712945, -21.073523) + + Point_px + + (141.690582, 109.430595) + (138.708572, 110.243591) + (135.455582, 111.870598) + (133.286575, 114.852592) + (132.473587, 118.105598) + (132.202576, 121.087593) + (131.660583, 124.340591) + (131.660583, 127.322594) + (131.660583, 131.118591) + (131.931580, 134.371597) + (132.744583, 137.624588) + (134.371582, 140.606598) + (137.353577, 143.046600) + (140.606583, 144.943588) + (143.588577, 145.214600) + (147.112579, 144.943588) + (150.094574, 144.401596) + (152.534576, 141.419601) + (153.618576, 138.437592) + (154.431580, 135.184601) + (154.703583, 133.286591) + + Total + 99751 + Type + 15 + + + Area + 3.6647229194641113 + Center + (-17.733328, -12.246459, -21.073523) + Dev + 45.059955596923828 + IndexInImage + 1 + Max + 347 + Mean + 146.99844360351562 + Min + 24 + Name + b1 + NumberOfPoints + 21 + Point_mm + + (-7.799183, -8.312946, -21.073523) + (-7.799183, -11.490285, -21.073523) + (-8.434336, -13.819974, -21.073523) + (-9.070276, -16.784817, -21.073523) + (-9.705435, -19.114506, -21.073523) + (-11.188244, -21.655910, -21.073523) + (-13.729649, -22.927004, -21.073523) + (-16.271059, -22.715288, -21.073523) + (-18.812464, -22.291063, -21.073523) + (-20.930431, -21.232473, -21.073523) + (-22.836683, -18.902784, -21.073523) + (-24.318712, -16.361380, -21.073523) + (-25.378088, -14.243412, -21.073523) + (-25.589804, -11.702006, -21.073523) + (-25.378088, -9.372317, -21.073523) + (-25.166367, -6.830913, -21.073523) + (-23.895275, -4.501217, -21.073523) + (-22.200745, -1.959032, -21.073523) + (-20.506994, 0.370652, -21.073523) + (-17.965590, 2.700335, -21.073523) + (-15.423404, 3.970653, -21.073523) + + Point_px + + (126.238579, 128.678589) + (126.238579, 124.611595) + (125.425583, 121.629593) + (124.611580, 117.834595) + (123.798576, 114.852592) + (121.900581, 111.599594) + (118.647583, 109.972595) + (115.394577, 110.243591) + (112.141579, 110.786598) + (109.430580, 112.141594) + (106.990578, 115.123596) + (105.093582, 118.376595) + (103.737579, 121.087593) + (103.466583, 124.340591) + (103.737579, 127.322594) + (104.008583, 130.575592) + (105.635582, 133.557602) + (107.804581, 136.811600) + (109.972580, 139.793594) + (113.225578, 142.775589) + (116.479576, 144.401596) + + Total + 94520 + Type + 15 + + + Area + 0.14295578002929688 + Center + (-26.365713, -8.947962, -21.073523) + Dev + 41.537315368652344 + IndexInImage + 2 + Max + 227 + Mean + 136.5 + Min + 80 + Name + 3 + NumberOfPoints + 6 + Point_mm + + (-24.953871, -7.889503, -21.073523) + (-24.953871, -10.430908, -21.073523) + (-27.283560, -12.336379, -21.073523) + (-27.706997, -10.006690, -21.073523) + (-27.071838, -7.677001, -21.073523) + (-26.224182, -5.347317, -21.073523) + + Point_px + + (104.280579, 129.220596) + (104.280579, 125.967598) + (101.298576, 123.528595) + (100.756577, 126.510597) + (101.569580, 129.492599) + (102.654579, 132.474594) + + Total + 4641 + Type + 15 + + + Area + 0.75974166393280029 + Center + (-16.976469, 8.348305, -21.073523) + Dev + 40.947456359863281 + IndexInImage + 3 + Max + 268 + Mean + 158.906982421875 + Min + 71 + Name + 1 + NumberOfPoints + 15 + Point_mm + + (-15.211682, 11.172217, -21.073523) + (-9.916369, 8.630807, -21.073523) + (-9.704648, 6.301123, -21.073523) + (-12.034337, 5.665964, -21.073523) + (-14.153086, 5.665964, -21.073523) + (-16.693716, 5.665964, -21.073523) + (-19.447617, 5.241746, -21.073523) + (-21.777308, 5.241746, -21.073523) + (-24.530434, 4.394871, -21.073523) + (-23.682777, 6.512839, -21.073523) + (-21.989029, 8.842523, -21.073523) + (-19.871056, 10.960502, -21.073523) + (-17.541372, 12.230808, -21.073523) + (-15.423404, 13.925344, -21.073523) + (-12.670278, 14.772219, -21.073523) + + Point_px + + (116.750580, 153.619598) + (123.528580, 150.366592) + (123.799583, 147.384598) + (120.817581, 146.571594) + (118.105583, 146.571594) + (114.853577, 146.571594) + (111.328583, 146.028595) + (108.346581, 146.028595) + (104.822578, 144.944595) + (105.907578, 147.655594) + (108.075577, 150.637589) + (110.786583, 153.348602) + (113.768578, 154.974594) + (116.479576, 157.143600) + (120.003578, 158.227600) + + Total + 20499 + Type + 15 + + + + + ImageIndex + 12 + NumberOfROIs + 3 + ROIs + + + Area + 4.8559694290161133 + Center + (4.145784, -10.913920, -18.073523) + Dev + 53.589687347412109 + IndexInImage + 0 + Max + 414 + Mean + 137.91050720214844 + Min + 40 + Name + b2 + NumberOfPoints + 25 + Point_mm + + (13.379725, -16.573095, -18.073523) + (13.168009, -18.902784, -18.073523) + (12.109406, -21.232473, -18.073523) + (10.838313, -23.350441, -18.073523) + (8.508630, -25.468409, -18.073523) + (5.967219, -26.103567, -18.073523) + (3.425820, -24.832476, -18.073523) + (0.884409, -23.773878, -18.073523) + (-1.656990, -22.291063, -18.073523) + (-3.139811, -19.961380, -18.073523) + (-4.199188, -17.419970, -18.073523) + (-4.410903, -14.878565, -18.073523) + (-4.622619, -12.337160, -18.073523) + (-4.622619, -9.160596, -18.073523) + (-4.199188, -6.619197, -18.073523) + (-3.351526, -4.076999, -18.073523) + (-2.716367, -1.535600, -18.073523) + (-0.386684, 0.158149, -18.073523) + (2.790661, 1.640970, -18.073523) + (5.332072, 3.123778, -18.073523) + (7.661755, 3.970653, -18.073523) + (9.991439, 3.970653, -18.073523) + (12.109406, 3.547210, -18.073523) + (14.439101, 1.217526, -18.073523) + (16.344566, -1.959032, -18.073523) + + Point_px + + (153.347580, 118.105598) + (153.076584, 115.123596) + (151.721573, 112.141594) + (150.094574, 109.430595) + (147.112579, 106.719597) + (143.859573, 105.906593) + (140.606583, 107.533592) + (137.353577, 108.888596) + (134.100586, 110.786598) + (132.202576, 113.768593) + (130.846573, 117.021599) + (130.575577, 120.274597) + (130.304581, 123.527596) + (130.304581, 127.593597) + (130.846573, 130.846588) + (131.931580, 134.100601) + (132.744583, 137.353592) + (135.726578, 139.521591) + (139.793579, 141.419601) + (143.046585, 143.317596) + (146.028580, 144.401596) + (149.010574, 144.401596) + (151.721573, 143.859589) + (154.703583, 140.877594) + (157.142578, 136.811600) + + Total + 115569 + Type + 15 + + + Area + 3.0556380748748779 + Center + (-15.709268, -10.578530, -18.073523) + Dev + 57.583786010742188 + IndexInImage + 1 + Max + 433 + Mean + 160.58757019042969 + Min + 43 + Name + b1 + NumberOfPoints + 23 + Point_mm + + (-9.917150, 1.640970, -18.073523) + (-9.917150, -0.688725, -18.073523) + (-9.070276, -3.018409, -18.073523) + (-7.587461, -5.348092, -18.073523) + (-7.375746, -7.889503, -18.073523) + (-7.375746, -10.430908, -18.073523) + (-8.010899, -13.184034, -18.073523) + (-9.493713, -15.726220, -18.073523) + (-11.188244, -18.055910, -18.073523) + (-13.517933, -20.385599, -18.073523) + (-15.635900, -22.927004, -18.073523) + (-17.965590, -23.562162, -18.073523) + (-19.235901, -21.232473, -18.073523) + (-20.506994, -18.902784, -18.073523) + (-21.353868, -16.361380, -18.073523) + (-21.989029, -14.243412, -18.073523) + (-22.624962, -11.913722, -18.073523) + (-23.048399, -9.372317, -18.073523) + (-23.471836, -7.042628, -18.073523) + (-23.260120, -4.712945, -18.073523) + (-21.989029, -2.383250, -18.073523) + (-19.871056, 0.158149, -18.073523) + (-16.906212, 2.276117, -18.073523) + + Point_px + + (123.527580, 141.419601) + (123.527580, 138.437592) + (124.611580, 135.455597) + (126.509583, 132.473602) + (126.780579, 129.220596) + (126.780579, 125.967598) + (125.967583, 122.443596) + (124.069580, 119.189598) + (121.900581, 116.207596) + (118.918579, 113.225594) + (116.207581, 109.972595) + (113.225578, 109.159592) + (111.599579, 112.141594) + (109.972580, 115.123596) + (108.888580, 118.376595) + (108.075577, 121.087593) + (107.261581, 124.069595) + (106.719582, 127.322594) + (106.177582, 130.304596) + (106.448578, 133.286591) + (108.075577, 136.268600) + (110.786583, 139.521591) + (114.581581, 142.232590) + + Total + 85272 + Type + 15 + + + Area + 0.80541670322418213 + Center + (-19.602465, 7.910508, -18.073523) + Dev + 36.190048217773438 + IndexInImage + 2 + Max + 249 + Mean + 165.41549682617188 + Min + 55 + Name + 1 + NumberOfPoints + 15 + Point_mm + + (-16.693716, 6.301123, -18.073523) + (-19.235121, 6.088621, -18.073523) + (-21.564810, 4.394871, -18.073523) + (-24.106997, 2.065188, -18.073523) + (-26.436680, 1.006586, -18.073523) + (-26.648401, 3.123778, -18.073523) + (-25.377308, 5.453462, -18.073523) + (-23.047619, 7.359714, -18.073523) + (-21.353088, 9.689397, -18.073523) + (-19.023399, 12.019093, -18.073523) + (-16.905432, 14.137060, -18.073523) + (-14.575743, 15.196437, -18.073523) + (-13.728868, 12.866742, -18.073523) + (-13.305430, 10.537059, -18.073523) + (-12.034337, 8.418304, -18.073523) + + Point_px + + (114.853577, 147.384598) + (111.600578, 147.112595) + (108.618576, 144.944595) + (105.364578, 141.962601) + (102.382584, 140.607590) + (102.111580, 143.317596) + (103.738579, 146.299591) + (106.720581, 148.739594) + (108.889580, 151.721588) + (111.871582, 154.703598) + (114.582581, 157.414597) + (117.564583, 158.770599) + (118.648582, 155.788589) + (119.190582, 152.806595) + (120.817581, 150.094589) + + Total + 23489 + Type + 15 + + + + + ImageIndex + 13 + NumberOfROIs + 2 + ROIs + + + Area + 4.1700363159179688 + Center + (5.654020, -7.254141, -15.073523) + Dev + 36.465950012207031 + IndexInImage + 0 + Max + 255 + Mean + 124.12603759765625 + Min + 8 + Name + b2 + NumberOfPoints + 23 + Point_mm + + (2.790661, -24.620752, -15.073523) + (0.460978, -23.350441, -15.073523) + (-1.445274, -21.232473, -15.073523) + (-2.081208, -18.902784, -15.073523) + (-2.292936, -15.726220, -15.073523) + (-2.292936, -12.972319, -15.073523) + (-1.869493, -10.219193, -15.073523) + (-1.445274, -7.254344, -15.073523) + (-1.021843, -4.924661, -15.073523) + (-0.386684, -2.383250, -15.073523) + (0.248475, 0.370652, -15.073523) + (1.307852, 2.912063, -15.073523) + (3.637536, 4.182369, -15.073523) + (5.967219, 4.182369, -15.073523) + (8.508630, 3.758937, -15.073523) + (11.050041, 2.487844, -15.073523) + (13.379725, 1.005811, -15.073523) + (15.709408, -1.535600, -15.073523) + (15.921135, -3.865283, -15.073523) + (16.132851, -6.194967, -15.073523) + (16.132851, -8.524662, -15.073523) + (16.344566, -10.854345, -15.073523) + (15.285976, -13.184034, -15.073523) + + Point_px + + (139.793579, 107.804596) + (136.811584, 109.430595) + (134.371582, 112.141594) + (133.557587, 115.123596) + (133.286575, 119.189598) + (133.286575, 122.714592) + (133.828583, 126.238594) + (134.371582, 130.033600) + (134.913574, 133.015594) + (135.726578, 136.268600) + (136.539581, 139.793594) + (137.895584, 143.046600) + (140.877579, 144.672592) + (143.859573, 144.672592) + (147.112579, 144.130600) + (150.365585, 142.503601) + (153.347580, 140.606598) + (156.329575, 137.353592) + (156.600586, 134.371597) + (156.871582, 131.389603) + (156.871582, 128.407593) + (157.142578, 125.425598) + (155.787582, 122.443596) + + Total + 89619 + Type + 15 + + + Area + 2.1888346672058105 + Center + (-17.279493, -9.190619, -15.073523) + Dev + 70.450813293457031 + IndexInImage + 1 + Max + 530 + Mean + 158.4759521484375 + Min + 36 + Name + b1 + NumberOfPoints + 21 + Point_mm + + (-10.340588, 0.158149, -15.073523) + (-11.188244, -2.171534, -15.073523) + (-12.246840, -4.501217, -15.073523) + (-12.670278, -6.830913, -15.073523) + (-11.399965, -9.372317, -15.073523) + (-11.611681, -11.913722, -15.073523) + (-11.823402, -14.455128, -15.073523) + (-13.093715, -16.996532, -15.073523) + (-15.847622, -19.114506, -15.073523) + (-18.177305, -19.961380, -15.073523) + (-20.506994, -19.326221, -15.073523) + (-22.836683, -17.631691, -15.073523) + (-24.106997, -15.090286, -15.073523) + (-24.530434, -12.760597, -15.073523) + (-23.895275, -10.219193, -15.073523) + (-21.565592, -7.889503, -15.073523) + (-20.718716, -5.559820, -15.073523) + (-20.718716, -3.018409, -15.073523) + (-20.295279, -0.688725, -15.073523) + (-19.024179, 1.852685, -15.073523) + (-16.271059, 2.487844, -15.073523) + + Point_px + + (122.985580, 139.521591) + (121.900581, 136.539597) + (120.545578, 133.557602) + (120.003578, 130.575592) + (121.629578, 127.322594) + (121.358582, 124.069595) + (121.087578, 120.816597) + (119.461578, 117.563599) + (115.936577, 114.852592) + (112.954582, 113.768593) + (109.972580, 114.581596) + (106.990578, 116.750595) + (105.364578, 120.003593) + (104.822578, 122.985596) + (105.635582, 126.238594) + (108.617577, 129.220596) + (109.701576, 132.202591) + (109.701576, 135.455597) + (110.243576, 138.437592) + (111.870583, 141.690598) + (115.394577, 142.503601) + + Total + 62598 + Type + 15 + + + + + ImageIndex + 14 + NumberOfROIs + 2 + ROIs + + + Area + 3.365635871887207 + Center + (4.396219, -7.545453, -12.073523) + Dev + 38.480926513671875 + IndexInImage + 0 + Max + 274 + Mean + 141.38888549804688 + Min + 34 + Name + b2 + NumberOfPoints + 24 + Point_mm + + (4.272695, -22.927004, -12.073523) + (1.942999, -21.655910, -12.073523) + (-0.386684, -19.749659, -12.073523) + (-2.081208, -17.208254, -12.073523) + (-3.139811, -14.666849, -12.073523) + (-3.351526, -11.913722, -12.073523) + (-3.351526, -9.584033, -12.073523) + (-2.928083, -6.830913, -12.073523) + (-2.716367, -4.501217, -12.073523) + (-2.081208, -1.959032, -12.073523) + (-1.656990, 0.370652, -12.073523) + (0.036759, 2.700335, -12.073523) + (2.366443, 3.758937, -12.073523) + (4.696126, 3.547210, -12.073523) + (7.237537, 2.700335, -12.073523) + (9.567221, 2.064401, -12.073523) + (11.896915, -0.053566, -12.073523) + (12.532849, -2.383250, -12.073523) + (13.591440, -4.712945, -12.073523) + (14.226599, -7.042628, -12.073523) + (13.591440, -9.160596, -12.073523) + (11.685188, -11.490285, -12.073523) + (10.203166, -13.819974, -12.073523) + (9.355505, -16.573095, -12.073523) + + Point_px + + (141.690582, 109.972595) + (138.708572, 111.599594) + (135.726578, 114.039597) + (133.557587, 117.292595) + (132.202576, 120.545593) + (131.931580, 124.069595) + (131.931580, 127.051598) + (132.473587, 130.575592) + (132.744583, 133.557602) + (133.557587, 136.811600) + (134.100586, 139.793594) + (136.268585, 142.775589) + (139.250580, 144.130600) + (142.232574, 143.859589) + (145.485580, 142.775589) + (148.467575, 141.961594) + (151.449585, 139.250595) + (152.263580, 136.268600) + (153.618576, 133.286591) + (154.431580, 130.304596) + (153.618576, 127.593597) + (151.178574, 124.611595) + (149.281586, 121.629593) + (148.196579, 118.105598) + + Total + 83985 + Type + 15 + + + Area + 1.9584149122238159 + Center + (-18.351572, -9.533941, -12.073523) + Dev + 55.752830505371094 + IndexInImage + 1 + Max + 385 + Mean + 140.61045837402344 + Min + 37 + Name + b1 + NumberOfPoints + 17 + Point_mm + + (-11.399965, -6.406694, -12.073523) + (-11.188244, -8.736378, -12.073523) + (-11.399965, -11.066067, -12.073523) + (-12.035118, -13.395756, -12.073523) + (-13.729649, -15.726220, -12.073523) + (-16.059338, -16.361380, -12.073523) + (-18.600742, -17.631691, -12.073523) + (-20.930431, -18.055910, -12.073523) + (-22.624962, -15.513723, -12.073523) + (-23.048399, -13.184034, -12.073523) + (-23.260120, -10.854345, -12.073523) + (-23.471836, -8.312946, -12.073523) + (-23.683559, -5.771535, -12.073523) + (-22.836683, -3.441852, -12.073523) + (-21.565592, -0.900441, -12.073523) + (-19.235901, 1.005811, -12.073523) + (-16.906212, 2.276117, -12.073523) + + Point_px + + (121.629578, 131.118591) + (121.900581, 128.136597) + (121.629578, 125.154594) + (120.816582, 122.172592) + (118.647583, 119.189598) + (115.665581, 118.376595) + (112.412582, 116.750595) + (109.430580, 116.207596) + (107.261581, 119.461594) + (106.719582, 122.443596) + (106.448578, 125.425598) + (106.177582, 128.678589) + (105.906578, 131.931595) + (106.990578, 134.913589) + (108.617577, 138.166595) + (111.599579, 140.606598) + (114.581581, 142.232590) + + Total + 48370 + Type + 15 + + + + + ImageIndex + 15 + NumberOfROIs + 2 + ROIs + + + Area + 3.8994133472442627 + Center + (2.824183, -8.507984, -9.073523) + Dev + 40.707279205322266 + IndexInImage + 0 + Max + 309 + Mean + 128.47067260742188 + Min + 37 + Name + b2 + NumberOfPoints + 25 + Point_mm + + (10.626597, -16.573095, -9.073523) + (10.203166, -19.326221, -9.073523) + (9.143789, -21.867626, -9.073523) + (6.814094, -23.773878, -9.073523) + (4.272695, -23.985600, -9.073523) + (1.731284, -22.502785, -9.073523) + (-0.598400, -20.597315, -9.073523) + (-2.504652, -18.055910, -9.073523) + (-3.351526, -15.726220, -9.073523) + (-3.986685, -13.395756, -9.073523) + (-4.622619, -10.642630, -9.073523) + (-5.046062, -7.889503, -9.073523) + (-5.046062, -5.136376, -9.073523) + (-4.834335, -2.806693, -9.073523) + (-4.410903, -0.477010, -9.073523) + (-3.351526, 2.064401, -9.073523) + (-1.021843, 2.912063, -9.073523) + (1.307852, 3.547210, -9.073523) + (3.637536, 4.182369, -9.073523) + (5.967219, 3.758937, -9.073523) + (8.296914, 2.912063, -9.073523) + (10.626597, 1.217526, -9.073523) + (12.321134, -1.112157, -9.073523) + (12.321134, -3.653568, -9.073523) + (12.109406, -5.771535, -9.073523) + + Point_px + + (149.823578, 118.105598) + (149.281586, 114.581596) + (147.925583, 111.328598) + (144.943573, 108.888596) + (141.690582, 108.617592) + (138.437576, 110.515594) + (135.455582, 112.954597) + (133.015579, 116.207596) + (131.931580, 119.189598) + (131.118576, 122.172592) + (130.304581, 125.696594) + (129.762573, 129.220596) + (129.762573, 132.744598) + (130.033585, 135.726593) + (130.575577, 138.708588) + (131.931580, 141.961594) + (134.913574, 143.046600) + (137.895584, 143.859589) + (140.877579, 144.672592) + (143.859573, 144.130600) + (146.841583, 143.046600) + (149.823578, 140.877594) + (151.992584, 137.895599) + (151.992584, 134.642593) + (151.721573, 131.931595) + + Total + 87617 + Type + 15 + + + Area + 1.4512419700622559 + Center + (-17.102921, -7.859307, -9.073523) + Dev + 37.706146240234375 + IndexInImage + 1 + Max + 251 + Mean + 117.3563232421875 + Min + 36 + Name + b1 + NumberOfPoints + 14 + Point_mm + + (-10.128872, -10.642630, -9.073523) + (-10.764026, -12.972319, -9.073523) + (-13.729649, -14.243412, -9.073523) + (-16.482775, -14.455128, -9.073523) + (-19.024179, -13.819974, -9.073523) + (-21.353868, -12.337160, -9.073523) + (-22.200745, -10.007470, -9.073523) + (-22.412466, -7.677787, -9.073523) + (-22.412466, -5.136376, -9.073523) + (-20.930431, -2.806693, -9.073523) + (-18.600742, -1.747316, -9.073523) + (-16.271059, -1.112157, -9.073523) + (-13.941370, -0.053566, -9.073523) + (-11.188244, -3.018409, -9.073523) + + Point_px + + (123.256577, 125.696594) + (122.443581, 122.714592) + (118.647583, 121.087593) + (115.123581, 120.816597) + (111.870583, 121.629593) + (108.888580, 123.527596) + (107.804581, 126.509598) + (107.533577, 129.491592) + (107.533577, 132.744598) + (109.430580, 135.726593) + (112.412582, 137.082596) + (115.394577, 137.895599) + (118.376579, 139.250595) + (121.900581, 135.455597) + + Total + 30630 + Type + 15 + + + + + + diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 2faab7b..a3fceae 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -51,7 +51,6 @@ SET(${LIBRARY_NAME}_BUILD_TREE_RELATIVE_INCLUDE_PATHS # Invoke the advanced macro CREA_ADVANCED_INSTALL_LIBRARY_FOR_CMAKE(${LIBRARY_NAME}) - SUBDIRS(Interface_ManagerContour_NDimensions) SUBDIRS(Interface_Icons_NDimensions) SUBDIRS(kernel_ManagerContour_NDimensions) diff --git a/lib/Interface_Icons_NDimensions/interfIOMenu.cxx b/lib/Interface_Icons_NDimensions/interfIOMenu.cxx index 00a74c9..5fc1d49 100644 --- a/lib/Interface_Icons_NDimensions/interfIOMenu.cxx +++ b/lib/Interface_Icons_NDimensions/interfIOMenu.cxx @@ -22,6 +22,10 @@ void interfIOMenu::initButtons(wxEvtHandler* evtHandler) { nom.push_back("Save all contours created ctrl + s"); funct.push_back((wxObjectEventFunction) &interfIOMenu:: onSave); + path.push_back(datadir + "/Import.png"); + nom.push_back("Import an OSIRIX XML file with contours"); + funct.push_back((wxObjectEventFunction) &interfIOMenu:: onImport); + this->addButtons(path, nom); this->setVectorFunction(funct); @@ -37,6 +41,11 @@ void interfIOMenu::onLoad(wxCommandEvent& event){ void interfIOMenu::onSave(wxCommandEvent& event){ interfMainPanel::getInstance()->onSave(); } + +void interfIOMenu::onImport(wxCommandEvent& event){ + interfMainPanel::getInstance()->onImport(); +} + interfIOMenu::~interfIOMenu() { } diff --git a/lib/Interface_Icons_NDimensions/interfIOMenu.h b/lib/Interface_Icons_NDimensions/interfIOMenu.h index 421632e..3edd182 100644 --- a/lib/Interface_Icons_NDimensions/interfIOMenu.h +++ b/lib/Interface_Icons_NDimensions/interfIOMenu.h @@ -19,6 +19,8 @@ public: void onLoad(wxCommandEvent& event); void onSave(wxCommandEvent& event); + void onImport(wxCommandEvent& event); + private: //wxEvtHandler* eventHandler; diff --git a/lib/Interface_Icons_NDimensions/interfMainPanel.cxx b/lib/Interface_Icons_NDimensions/interfMainPanel.cxx index 6f5dd53..d4f34a0 100644 --- a/lib/Interface_Icons_NDimensions/interfMainPanel.cxx +++ b/lib/Interface_Icons_NDimensions/interfMainPanel.cxx @@ -434,6 +434,10 @@ void interfMainPanel::onSave() wxContourMainFrame::getInstance()->onSave(); } +void interfMainPanel::onImport(){ + wxContourMainFrame::getInstance()->onImport(); +} + void interfMainPanel::RefreshInterface() { wxContourMainFrame::getInstance()->RefreshInterface(); diff --git a/lib/Interface_Icons_NDimensions/interfMainPanel.h b/lib/Interface_Icons_NDimensions/interfMainPanel.h index 90d2a30..5181f29 100644 --- a/lib/Interface_Icons_NDimensions/interfMainPanel.h +++ b/lib/Interface_Icons_NDimensions/interfMainPanel.h @@ -117,6 +117,7 @@ public: ////////////////////////// void onLoad(); void onSave(); + void onImport(); /////////////////////////////7 void RefreshInterface(); vtkImageData* getImageData(); diff --git a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx index e86dc1b..8941bde 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx +++ b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx @@ -912,11 +912,8 @@ void wxContourMainFrame ::loadContours( FILE *pFile, bool staticContour ) } void wxContourMainFrame::onLoad() -{ - char tmp[255]; - char tmpD[255]; +{ std::string fileNameContourROI = GetFileLocation(); - //CMRU 03-09-09----------------------------------------------------------------------------------------------- if(GetFileLocation().empty()) { @@ -928,6 +925,13 @@ void wxContourMainFrame::onLoad() } } + onLoadContours(fileNameContourROI); +} + +void wxContourMainFrame::onLoadContours(std::string fileNameContourROI){ + char tmp[255]; + char tmpD[255]; + FILE *pFile =fopen(fileNameContourROI.c_str(),"r+"); @@ -985,6 +989,23 @@ void wxContourMainFrame::onLoad() } _theViewPanel->getSceneManager()->removeSceneContours(); changeInstant(); + +} + +void wxContourMainFrame::onImport(){ + std::string filename, filenamecontours; + wxFileDialog dialog(NULL, _T("Choose a XML Osirix File"), _T(""), _T(""), _T("*.xml"), wxOPEN ); + + if (dialog.ShowModal() == wxID_OK) + { + filename = dialog.GetPath().mb_str(); + filenamecontours = kernelManager->parseOsirixFile(filename); + + if(filenamecontours.compare("") != 0){ + onLoadContours(filenamecontours); + } + + } } //AD: 29-05-09 diff --git a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h index d73d2e7..9c50da0 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h +++ b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h @@ -243,7 +243,7 @@ class wxContourMainFrame : public wxPanel { ///////////////////////7 void onLoad(); void onSave(); - + void onImport(); void openContours( FILE *pFile, FILE *pFileData, int version, bool staticContour ); void RefreshInterface(); @@ -451,6 +451,7 @@ private: void loadContours( FILE *pFile, bool staticContour ); void saveFileWithContours( std::string filename ); + void onLoadContours(std::string fileNameContourROI); int inredo; int inundo; diff --git a/lib/kernel_ManagerContour_NDimensions/CMakeLists.txt b/lib/kernel_ManagerContour_NDimensions/CMakeLists.txt index 0fcd339..0ed0866 100644 --- a/lib/kernel_ManagerContour_NDimensions/CMakeLists.txt +++ b/lib/kernel_ManagerContour_NDimensions/CMakeLists.txt @@ -29,7 +29,7 @@ IF ( BUILD_${LIBRARY_NAME} ) #---------------------------------------------------------------------------- # LIBRARY SOURCES (TO BE COMPILED) # EITHER LIST ALL .cxx, *.cpp, *.cc IN CURRENT DIR USING NEXT LINE: - FILE(GLOB ${LIBRARY_NAME}_SOURCES *.cxx *.cpp *.cc *.h *.txx) + FILE(GLOB ${LIBRARY_NAME}_SOURCES *.cxx *.cpp *.cc *.txx) # OR MANUALLY LIST YOUR FILES WITH NEXT COMMAND (WITHOUT EXTENSION) # SET ( ${LIBRARY_NAME}_SOURCES # @@ -38,6 +38,12 @@ IF ( BUILD_${LIBRARY_NAME} ) #---------------------------------------------------------------------------- # LIBRARY DEPENDENCIES (LIBRARIES TO LINK WITH) + #JCP parserOsirix + OPTION ( BUILD_ParserOsirix "Build ParserOsirix ?" OFF) + IF(BUILD_ParserOsirix) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/ParserOsirix/ParserOsirix.cmake) + ENDIF(BUILD_ParserOsirix) + #JCP parserOsirix # MESSAGE(ERROR ${creaMaracasVisu_LIBRARIES}) SET ( ${LIBRARY_NAME}_LINK_LIBRARIES @@ -46,19 +52,23 @@ IF ( BUILD_${LIBRARY_NAME} ) ${WXWIDGETS_LIBRARIES} ${VTK_LIBRARIES} ${creaMaracasVisu_LIBRARIES} + ${ParserOsirix_LIBRARIES} # ${ITK_LIBRARIES} # ${GDCM_LIBRARIES} # ${BOOST_LIBRARIES} ) #---------------------------------------------------------------------------- + SOURCE_GROUP("Source Files" FILES ${${LIBRARY_NAME}_SOURCES}) + SOURCE_GROUP("Header Files" FILES ${${LIBRARY_NAME}_HEADERS}) + #---------------------------------------------------------------------------- # MACRO WHICH DOES ALL THE JOB : BUILD AND INSTALL #CREA_ADD_LIBRARY( ${LIBRARY_NAME} ) #---------------------------------------------------------------------------- - ADD_LIBRARY(${LIBRARY_NAME} STATIC ${${LIBRARY_NAME}_SOURCES}) + ADD_LIBRARY(${LIBRARY_NAME} STATIC ${${LIBRARY_NAME}_SOURCES} ${ParserOsirix_SOURCES} ${${LIBRARY_NAME}_HEADERS} ${ParserOsirix_HEADERS}) # LINK TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${${LIBRARY_NAME}_LINK_LIBRARIES} ) diff --git a/lib/kernel_ManagerContour_NDimensions/KernelManagerContour.cxx b/lib/kernel_ManagerContour_NDimensions/KernelManagerContour.cxx index ec6251f..57f9228 100644 --- a/lib/kernel_ManagerContour_NDimensions/KernelManagerContour.cxx +++ b/lib/kernel_ManagerContour_NDimensions/KernelManagerContour.cxx @@ -93,6 +93,7 @@ void KernelManagerContour::setVectImages(std::vector vectimg){ } void KernelManagerContour::initializeEnvironment(std::string datadir){ + _datadir = datadir; std::string conceptsFN = datadir+"holaConceptsFile.cf"; std::string imageSourcesFN = datadir+"holaImagesInstantsFile.of"; std::string imageSectionsFN = ""; @@ -465,4 +466,30 @@ void KernelManagerContour::setCurrentFileName(std::string filenam){ this->filename = filenam; } +std::string KernelManagerContour::parseOsirixFile(std::string filename){ + + +#ifdef ParserOsirix_BUILD + vtkImageData* sourceimage; + std::string xsdfile; + + xsdfile = _datadir; + + xsdfile.append("\\XML\\osirixschema.xsd"); + + sourceimage = getSourceImage(); + OsirixParser p(xsdfile.c_str(), sourceimage->GetSpacing(), sourceimage->GetExtent()); + + if(p.ParseFile(filename.c_str())!= 0){ + + } + + return p.getContoursFileName(); +#else + return ""; +#endif + + +} + diff --git a/lib/kernel_ManagerContour_NDimensions/KernelManagerContour.h b/lib/kernel_ManagerContour_NDimensions/KernelManagerContour.h index f7c2853..4df96d1 100644 --- a/lib/kernel_ManagerContour_NDimensions/KernelManagerContour.h +++ b/lib/kernel_ManagerContour_NDimensions/KernelManagerContour.h @@ -13,7 +13,9 @@ #include "OutlineModelManager.h" #include "OutlineModelBuilder.h" #include "time.h" - +#ifdef ParserOsirix_BUILD +#include "OsirixParser.h" +#endif #include "ContourPropagation.h" #include "manualContourModel.h" @@ -144,6 +146,8 @@ public: void setCurrentFileName(std::string filenam); std::string getCurrentFileName(); + + std::string parseOsirixFile(std::string filename); private: //------------------------------------------------------------------------------------------------------------ // Attributes @@ -162,6 +166,7 @@ private: int inundo; int _currentIndex; std::string stundoredo; + std::string _datadir; ContourPropagation* _contourPropagation; diff --git a/lib/kernel_ManagerContour_NDimensions/ParserOsirix/OsirixParser.cxx b/lib/kernel_ManagerContour_NDimensions/ParserOsirix/OsirixParser.cxx new file mode 100644 index 0000000..4c36214 --- /dev/null +++ b/lib/kernel_ManagerContour_NDimensions/ParserOsirix/OsirixParser.cxx @@ -0,0 +1,507 @@ + +//---------------------------------------------------------------------------------------------------------------- +// Class definition include +//---------------------------------------------------------------------------------------------------------------- +#include "OsirixParser.h" + +#include + + +OsirixParser::OsirixParser(std::string xsdfile, double* spacing, int* extent) +{ + schema=xsdfile; + + OSIRIX_DICT = "dict"; + OSIRIX_KEY = "key"; + OSIRIX_IMAGES = "Images"; + OSIRIX_ARRAY = "array"; + OSIRIX_IMAGEINDEX = "ImageIndex"; + OSIRIX_INTEGER = "integer"; + OSIRIX_NUMBEROFROIS = "NumberOfROIs"; + OSIRIX_ROIS = "ROIs"; + OSIRIX_POINT_MM = "Point_mm"; + OSIRIX_POINT_PX = "Point_px"; + OSIRIX_STRING = "string"; + + if(spacing != NULL){ + _spacing[0] = spacing[0]; + _spacing[1] = spacing[1]; + _spacing[2] = spacing[2]; + }else{ + _spacing[0] = 1; + _spacing[1] = 1; + _spacing[2] = 1; + } + + if(extent != NULL){ + _extent[0] = extent[0]; + _extent[1] = extent[1]; + _extent[2] = extent[2]; + _extent[3] = extent[3]; + _extent[4] = extent[4]; + _extent[5] = extent[5]; + + }else{ + _extent[0] = 1; + _extent[1] = 1; + _extent[2] = 1; + _extent[3] = 1; + _extent[4] = 1; + _extent[5] = 1; + } + + + /*HEADER*/ + CREACONTOUR = "--CreaContour--"; + CREACONTOUR_VERSION = "Version 1.0.2"; + CREACONTOUR_IMAGEDIMENSIONS = "ImageDimensions"; + CREACONTOUR_IMAGESPACING = "ImageSpacing"; + CREACONTOUR_NUMBEROFCONTOURS = "NumberOfContours"; + /*FOR EACH CONTOUR*/ + CREACONTOUR_INSTANT = "Instant"; + CREACONTOUR_TYPEMODEL = "TypeModel"; + CREACONTOUR_NUMBEROFCONTROLPOINTS = "NumberOfControlPoints"; + CREACONTOUR_TYPEVIEW = "TypeView"; + /*STATICCONTOURS*/ + CREACONTOUR_NUMBEROFCONTOURSSTATIC = "NumberOfContoursStatic"; + + +#ifdef WIN32 + + char currentPath[_MAX_PATH]; + GetModuleFileName(NULL, currentPath, _MAX_PATH); + TEMPIMPORTOSIRIXFILE = currentPath; + + TEMPIMPORTOSIRIXFILE = TEMPIMPORTOSIRIXFILE.substr(0,TEMPIMPORTOSIRIXFILE.find_last_of("\\")); + + TEMPIMPORTOSIRIXFILE.append("\\data\\TEMPIMPORTOSIRIXFILE.roi"); + +#else + TEMPIMPORTOSIRIXFILE = "./data/TEMPIMPORTOSIRIXFILE"; +#endif + +} +OsirixParser::~OsirixParser(){ + +} + +int OsirixParser::ParseFile(const char* xmlfile){ + + xercesc::DOMDocument *doc; + + + try { + XMLPlatformUtils::Initialize(); + } + catch (const XMLException& toCatch) { + char* message = XMLString::transcode(toCatch.getMessage()); + cout << "Error during initialization! :\n" + << message << "\n"; + XMLString::release(&message); + return 1; + } + + XercesDOMParser* OsirixParser = new XercesDOMParser(); + + + OsirixParser->setDoNamespaces(true); + OsirixParser->setDoSchema(true); + OsirixParser->setValidationScheme(XercesDOMParser::Val_Always ); + OsirixParser->setExternalNoNamespaceSchemaLocation(XMLString::transcode(schema.c_str())); + OsirixParser->setValidationSchemaFullChecking(true); + OsirixParser->setValidationConstraintFatal(true); + OsirixParser->setExitOnFirstFatalError(true); + + + ErrorHandler* errHandler = (ErrorHandler*) new OsirixParserErrorHandler(); + + OsirixParser->setErrorHandler(errHandler); + + + try { + OsirixParser->parse(xmlfile); + + + if(OsirixParser->getErrorCount() > 0){ + + errorline = ((OsirixParserErrorHandler*)OsirixParser->getErrorHandler())->getErrorMsg(); + + + delete OsirixParser; + delete errHandler; + return -2; + } + + + + } + catch (const XMLException& toCatch) { + char* message = XMLString::transcode(toCatch.getMessage()); + cout << "Exception message is: \n" + << message << "\n"; + XMLString::release(&message); + delete OsirixParser; + delete errHandler; + return -1; + } + catch (const DOMException& toCatch) { + char* message = XMLString::transcode(toCatch.msg); + cout << "Exception message is: \n" + << message << "\n"; + XMLString::release(&message); + delete OsirixParser; + delete errHandler; + return -1; + } + catch (...) { + cout << "Unexpected Exception \n" ; + delete OsirixParser; + delete errHandler; + return -1; + } + + std::cout<<"parsing document..."<getDocument(); +// DOMNodeList* list = doc->getChildNodes(); + getUserData(doc->getDocumentElement()); + + + saveCreaContoursFormat(); + + delete OsirixParser; + delete errHandler; + + + + return 0; + +} + +void OsirixParser::setErrorLine(DOMNodeList* list){ + + DOMNode* node = list->item(0); + this->errorline = XMLString::transcode(node->getTextContent()); + +} +DOMNode* OsirixParser::getLastNode(DOMNodeList* list){ + + + DOMNode* node; + /*for(int i = list->getLength()-1; i >= 0 ;i--){ + + node = list->item(i); + + if(node->getNodeType() == DOMNode::ELEMENT_NODE){ + i = -1; + } + + }*/ + node = list->item(list->getLength()-1); + + + + if(node->getChildNodes()->getLength()>0){ + return getLastNode(node->getChildNodes()); + } + return node; + +} + +void OsirixParser::getUserData(DOMElement* element){ + parseOSIRIX_DICT(element->getElementsByTagName(XMLString::transcode(OSIRIX_DICT))); +} + +void OsirixParser::parseOSIRIX_DICT(DOMNodeList* list){ + int i, j; + DOMNode* node, *childnode, *childnode1, *childarray; + std::string point_mm, point_px, osirixinteger, imageindex, temp; + DOMNodeList* childlist; + point_mm = OSIRIX_POINT_MM; + point_px = OSIRIX_POINT_PX; + imageindex = OSIRIX_IMAGEINDEX; + osirixinteger = OSIRIX_INTEGER; + + + + for(i = 0; i < (int)(list->getLength()); i++){ + node = list->item(i); + childlist = node->getChildNodes(); + for(j = 0; j < (int)(childlist->getLength());j++){ + childnode = childlist->item(j); + temp = XMLString::transcode(childnode->getTextContent()); + + + if(point_mm.compare(temp)==0){ + childarray = childlist->item(j+2); + //temp = XMLString::transcode(childarray->getNodeName()); + if(childarray != 0){ + parseOSIRIX_POINT_MM(childarray->getChildNodes()); + } + }else if(point_px.compare(temp)==0){ + childarray = childlist->item(j+2); + //temp = XMLString::transcode(childarray->getNodeName()); + if(childarray != 0){ + parseOSIRIX_POINT_PX(childarray->getChildNodes()); + } + }else if(imageindex.compare(temp) == 0){ + childnode1 = childlist->item(j+2); + if(childnode1 != NULL && osirixinteger.compare(XMLString::transcode(childnode1->getNodeName())) == 0){ + _imageindex = atoi(XMLString::transcode(childnode1->getTextContent())); + } + } + } + } +} + +void OsirixParser::parseOSIRIX_POINT_MM(DOMNodeList* list){ + int i, stringfound0, stringfound1; + DOMNode* node; + string temp, osirix_string, numx, numy, numz; + vector* vectorx; + vector* vectory; + vector* vectorz; + vectorXYZ vectorxyz; + double x, y, z; + + vectorx = new vector; + vectory = new vector; + vectorz = new vector; + + osirix_string = OSIRIX_STRING; + + for(i = 0; i < (int)(list->getLength()); i++){ + node = list->item(i); + if(osirix_string.compare(XMLString::transcode(node->getNodeName()))==0){ + temp = XMLString::transcode(node->getTextContent()); + + stringfound0 = temp.find(",",0); + numx = temp.substr(1, stringfound0-1); + + stringfound1 = temp.find(",",stringfound0+1); + numy = temp.substr(stringfound0+1, stringfound1-stringfound0-1); + + stringfound0 = temp.find(")",stringfound1+1); + numz = temp.substr(stringfound1+1, stringfound0-stringfound1-1); + + x = atof(numx.c_str()); + y = atof(numy.c_str()); + z = atof(numz.c_str()); + + vectorx->push_back(x); + vectory->push_back(y); + vectorz->push_back(z); + } + } + if(vectorx->size() > 0){ + vectorxyz.push_back(*vectorx); + vectorxyz.push_back(*vectory); + vectorxyz.push_back(*vectorz); + contoursmapMM.insert(pair(contoursmapMM.size(), vectorxyz)); + } +} + +void OsirixParser::parseOSIRIX_POINT_PX(DOMNodeList* list){ + int i, stringfound0, stringfound1; + DOMNode* node; + string temp, osirix_string, numx, numy; + vector* vectorx; + vector* vectory; + vector* vectorz; + vectorXYZ vectorxyz; + double x, y, z; + + vectorx = new vector; + vectory = new vector; + vectorz = new vector; + + osirix_string = OSIRIX_STRING; + + for(i = 0; i < (int)(list->getLength()); i++){ + node = list->item(i); + if(osirix_string.compare(XMLString::transcode(node->getNodeName()))==0){ + temp = XMLString::transcode(node->getTextContent()); + + stringfound0 = temp.find(",",0); + numx = temp.substr(1, stringfound0-1); + + stringfound1 = temp.find(")",stringfound0+1); + numy = temp.substr(stringfound0+1, stringfound1-stringfound0-1); + + x = atof(numx.c_str()); + y = atof(numy.c_str()); + + vectorx->push_back(x); + vectory->push_back(y); + vectorz->push_back(_imageindex); + } + } + if(vectorx->size() > 0){ + vectorxyz.push_back(*vectorx); + vectorxyz.push_back(*vectory); + vectorxyz.push_back(*vectorz); + contoursmapPX.insert(pair(contoursmapPX.size(), vectorxyz)); + } +} + + + +void OsirixParser::getData(DOMNodeList* list, std::vector& vect, std::string tagname){ + + for(int i = 0; i < (int)(list->getLength()); i++){ + DOMNode* node = list->item(i); + if(tagname.compare(XMLString::transcode(node->getNodeName()))==0){ + std::cout<<"NODENAME "<getTextContent())<getTextContent())); + } + + } +} + +void OsirixParser::saveCreaContoursFormat(){ + FILE *pFile=fopen(TEMPIMPORTOSIRIXFILE.c_str(),"w+"); + + if(pFile){ + writeHeader(pFile); + writeContours(pFile); + writeContoursStatic(pFile); + fclose(pFile); + } +} + +void OsirixParser::writeContoursStatic(FILE* pFile){ + fprintf(pFile, CREACONTOUR_IMAGEDIMENSIONS); + fprintf(pFile, " %d %d %d\n", _extent[1] - _extent[0],_extent[3] - _extent[2], _extent[5] - _extent[4]); + fprintf(pFile, CREACONTOUR_IMAGESPACING); + fprintf(pFile, " %f %f %f\n", _spacing[0], _spacing[1], _spacing[2]); + fprintf(pFile, CREACONTOUR_NUMBEROFCONTOURSSTATIC); + fprintf(pFile, " 0\n"); +} + +void OsirixParser::writeContours(FILE* pFile){ + + map::iterator itPX; + vector vectx, vecty, vectz; + int i, valuez; + int dimz = 0, dimy = 0; + + if(_extent != 0){ + dimz = _extent[5] - _extent[4] + 1; + dimy = _extent[3] - _extent[2] + 1; + } + + /*for (itMM = contoursmapMM.begin(), itPX = contoursmapPX.begin(); + itMM != contoursmapMM.end(), itPX != contoursmapPX.end(); + itMM++, itPX++ ){*/ + for (itPX = contoursmapPX.begin(); itPX != contoursmapPX.end(); itPX++ ){ + + vectx = ((*itPX).second)[0]; + vecty = ((*itPX).second)[1]; + vectz = ((*itPX).second)[2]; + + if(!vectz.empty()){ + + valuez = (int) vectz[0] / _spacing[2]; + + fprintf(pFile, CREACONTOUR_INSTANT); + fprintf(pFile, " 1 %d 1 1 1 1\n",dimz - valuez); + fprintf(pFile, CREACONTOUR_TYPEMODEL); + fprintf(pFile, " 1\n"); + fprintf(pFile, CREACONTOUR_NUMBEROFCONTROLPOINTS); + fprintf(pFile, " %d\n", vectz.size()); + for(i = 0; i < vectx.size(); i++){ + fprintf(pFile, "%f %f 900.00\n", vectx[i]/ _spacing[0],dimy - vecty[i]/ _spacing[1]); + } + fprintf(pFile, CREACONTOUR_TYPEVIEW); + fprintf(pFile, " 1\n"); + + } + } +} + +void OsirixParser::writeHeader(FILE* pFile){ + + + fprintf(pFile, CREACONTOUR); + fprintf(pFile, "\n"); + fprintf(pFile, CREACONTOUR_VERSION); + fprintf(pFile, "\n"); + fprintf(pFile, CREACONTOUR_IMAGEDIMENSIONS); + fprintf(pFile, " %d %d %d\n", _extent[1] - _extent[0],_extent[3] - _extent[2], _extent[5] - _extent[4]); + fprintf(pFile, CREACONTOUR_IMAGESPACING); + fprintf(pFile, " %f %f %f\n", _spacing[0], _spacing[1], _spacing[2]); + fprintf(pFile, CREACONTOUR_NUMBEROFCONTOURS); + fprintf(pFile, " %d\n", contoursmapPX.size()); + + + +} + + +std::string OsirixParser::getContoursFileName(){ + return TEMPIMPORTOSIRIXFILE; +} + +/** +** The Error Handler's interface implementation +**/ + +/** + ** Default Constructor + **/ +OsirixParserErrorHandler::OsirixParserErrorHandler() +: ErrorHandler(){ + + + + +} + /** + ** Desctructor by defect + **/ +OsirixParserErrorHandler::~OsirixParserErrorHandler(){ +} + +void OsirixParserErrorHandler::warning (const SAXParseException &exc){ +} + +void OsirixParserErrorHandler::error (const SAXParseException &exc){ + char c[1000]; + errormsg = "Column "; +// errormsg += itoa(exc.getColumnNumber(),c,10); + sprintf_s(c,"%d",(int)(exc.getColumnNumber())); + errormsg += std::string(c); + + errormsg += " Line "; +// errormsg += itoa(exc.getLineNumber(),c,10); + sprintf_s(c,"%d",(int)(exc.getLineNumber())); + errormsg += std::string(c); + + errormsg += " "; + errormsg += XMLString::transcode(exc.getMessage()); + +} + +void OsirixParserErrorHandler::fatalError (const SAXParseException &exc){ + char c[1000]; + errormsg = "Column "; +// errormsg += itoa(exc.getColumnNumber(),c,10); + sprintf_s(c,"%d",(int)(exc.getColumnNumber())); + errormsg += std::string(c); + + errormsg += " Line "; +// errormsg += itoa(exc.getLineNumber(),c,10); + sprintf_s(c,"%d",(int)(exc.getLineNumber())); + errormsg += std::string(c); + + errormsg += " "; + errormsg += XMLString::transcode(exc.getMessage()); +} + +void OsirixParserErrorHandler::resetErrors (){ +} + +std::string OsirixParserErrorHandler::getErrorMsg(){ + return this->errormsg; +} diff --git a/lib/kernel_ManagerContour_NDimensions/ParserOsirix/OsirixParser.h b/lib/kernel_ManagerContour_NDimensions/ParserOsirix/OsirixParser.h new file mode 100644 index 0000000..61aecea --- /dev/null +++ b/lib/kernel_ManagerContour_NDimensions/ParserOsirix/OsirixParser.h @@ -0,0 +1,163 @@ +#ifndef __OsirixParser__ +#define __OsirixParser__ + + +#if defined(_WIN32) +#include "Windows.h" + #ifdef kernelParserOsirix_BUILD_SHARED + #define kernelParserOsirix_EXPORT __declspec( dllexport ) + #else + #define kernelParserOsirix_EXPORT __declspec( dllimport ) + #endif + #define kernelParserOsirix_CDECL __cdecl +#else + #define kernelParserOsirix_EXPORT + #define kernelParserOsirix_CDECL +#endif // defined(_WIN32) + +//------------------------------------------------------------------------------------------------------------ +// Includes +//------------------------------------------------------------------------------------------------------------ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +using namespace std; +using namespace xercesc; + + + +class OsirixParser{ + +//------------------------------------------------------------------------------------------------------------ +// Constructors & Destructors +//------------------------------------------------------------------------------------------------------------ +public: + + /** + ** Constructor for the parser, with the information of the pixel spacing and image dimensions + **/ + OsirixParser(std::string xsdfile = "", double* spacing = NULL, int* extent = NULL); + /** + ** Desctructor by defect + **/ + ~OsirixParser(); + + int ParseFile(const char* xmlfile); + + + std::string getErrorLine(); + + std::string getContoursFileName(); + +private: + + std::string schema; + + std::string errorline; + + int _imageindex; + + const char* OSIRIX_DICT; + const char* OSIRIX_KEY; + const char* OSIRIX_IMAGES; + const char* OSIRIX_ARRAY; + const char* OSIRIX_IMAGEINDEX; + const char* OSIRIX_INTEGER; + const char* OSIRIX_NUMBEROFROIS; + const char* OSIRIX_ROIS; + const char* OSIRIX_POINT_MM; + const char* OSIRIX_POINT_PX; + const char* OSIRIX_STRING; + + const char* CREACONTOUR; + const char* CREACONTOUR_VERSION; + const char* CREACONTOUR_IMAGEDIMENSIONS; + const char* CREACONTOUR_IMAGESPACING; + const char* CREACONTOUR_NUMBEROFCONTOURS; + + const char* CREACONTOUR_INSTANT; + const char* CREACONTOUR_TYPEMODEL; + const char* CREACONTOUR_NUMBEROFCONTROLPOINTS; + const char* CREACONTOUR_TYPEVIEW; + + const char* CREACONTOUR_NUMBEROFCONTOURSSTATIC; + + std::string TEMPIMPORTOSIRIXFILE; + + double _spacing[3]; + int _extent[6]; + + typedef vector> vectorXYZ; + std::map contoursmapMM; + std::map contoursmapPX; + + void saveCreaContoursFormat(); + + void writeHeader(FILE* pFile); + void writeContours(FILE* pFile); + void writeContoursStatic(FILE* pFile); + + void setErrorLine(DOMNodeList* list); + + void getUserData(DOMElement* element); + + void getData(DOMNodeList* list, std::vector& vect, std::string tagname); + + DOMNode* getLastNode(DOMNodeList* list); + + void parseOSIRIX_DICT(DOMNodeList* list); + void parseOSIRIX_POINT_MM(DOMNodeList* list); + void parseOSIRIX_POINT_PX(DOMNodeList* list); + + + + +}; + +class OsirixParserErrorHandler : public ErrorHandler{ + +//------------------------------------------------------------------------------------------------------------ +// Constructors & Destructors +//------------------------------------------------------------------------------------------------------------ +public: + + /** + ** Default Constructor + **/ + OsirixParserErrorHandler(); + /** + ** Desctructor by defect + **/ + ~OsirixParserErrorHandler(); + + virtual void warning (const SAXParseException &exc); + + virtual void error (const SAXParseException &exc); + + virtual void fatalError (const SAXParseException &exc); + + virtual void resetErrors (); + + std::string getErrorMsg(); + +private: + + + std::string errormsg; + + + + + +}; +#endif diff --git a/lib/kernel_ManagerContour_NDimensions/ParserOsirix/ParserOsirix.cmake b/lib/kernel_ManagerContour_NDimensions/ParserOsirix/ParserOsirix.cmake new file mode 100644 index 0000000..39cf778 --- /dev/null +++ b/lib/kernel_ManagerContour_NDimensions/ParserOsirix/ParserOsirix.cmake @@ -0,0 +1,23 @@ +#---------------------------------------------------------------------------- +# SET THE NAME OF YOUR LIBRARY +SET ( SOURCEGROUP_NAME ParserOsirix ) +#---------------------------------------------------------------------------- + +CREA_DEFINE(${SOURCEGROUP_NAME}_BUILD) + +FILE(GLOB ${SOURCEGROUP_NAME}_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/ParserOsirix/*.h) + # OR MANUALLY LIST YOUR HEADERS WITH NEXT COMMAND + # SET ( ${LIBRARY_NAME}_HEADERS + # + # ) + #---------------------------------------------------------------------------- + + #---------------------------------------------------------------------------- + # LIBRARY SOURCES (TO BE COMPILED) + # EITHER LIST ALL .cxx, *.cpp, *.cc IN CURRENT DIR USING NEXT LINE: +FILE(GLOB ${SOURCEGROUP_NAME}_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/ParserOsirix/*.cxx) + +SOURCE_GROUP("Source Files\\Osirix" FILES ${${SOURCEGROUP_NAME}_SOURCES}) +SOURCE_GROUP("Header Files\\Osirix" FILES ${${SOURCEGROUP_NAME}_HEADERS}) + +SET(${SOURCEGROUP_NAME}_LIBRARIES ${XERCES_LIBRARIES}) \ No newline at end of file -- 2.47.1