From c5feadbb145eecf6d73f793535b7e23eb18db2cb Mon Sep 17 00:00:00 2001 From: casallas Date: Fri, 31 Oct 2008 16:31:30 +0000 Subject: [PATCH] creaMaracasVisu Library --- CMakeLists.txt | 34 + appli/template_appli/CMakeLists.txt | 33 + appli/template_wx_appli/CMakeLists.txt | 40 + lib/CMakeLists.txt | 2 + lib/maracasVisuLib/CMakeLists.txt | 276 + lib/maracasVisuLib/include/Maracas.iss | 48 + .../include/Modules/FindCrea.cmake | 3 + .../include/Modules/FindGDCM.cmake | 104 + .../include/Modules/FindGLIB.cmake | 57 + .../include/Modules/FindGSL.cmake | 85 + .../include/Modules/FindGSLobj.cmake | 62 + .../include/Modules/FindGTK.cmake | 97 + .../include/Modules/FindGTK2.cmake | 328 + .../include/Modules/FindKGFO.cmake | 85 + .../include/Modules/FindLibido.cmake | 71 + .../include/Modules/FindMySQL.cmake | 49 + .../include/Modules/FindwxGlade.cmake | 54 + .../include/Modules/FindwxW.cmake | 573 ++ .../include/Modules/GDCMConfig.cmake | 113 + .../include/Modules/MARACAS_Find_GDCM.cmake | 16 + .../include/Modules/MARACAS_Find_ITK.cmake | 71 + .../include/Modules/MARACAS_Find_LIBIDO.cmake | 4 + .../include/Modules/MARACAS_Find_VTK.cmake | 16 + .../Modules/MARACAS_Find_WXWIDGETS.cmake | 51 + .../include/Modules/UseGDCM.cmake | 51 + lib/maracasVisuLib/include/mathdefs.h | 70 + lib/maracasVisuLib/include/matrix.h | 431 ++ lib/maracasVisuLib/include/vector.h | 382 + lib/maracasVisuLib/include/vmfuncs.h | 733 ++ lib/maracasVisuLib/src/CMakeLists.txt | 5 + lib/maracasVisuLib/src/CMakeListsWorking.txt | 5 + .../src/interface/CMakeLists.txt | 1 + .../src/interface/tcl/Makefile.am | 43 + .../src/interface/tcl/Makefile.in | 517 ++ .../src/interface/tcl/general.tcl | 135 + .../src/interface/tcl/icons/3D.gif | Bin 0 -> 1836 bytes .../src/interface/tcl/icons/add.gif | Bin 0 -> 1836 bytes .../src/interface/tcl/icons/area.gif | Bin 0 -> 862 bytes .../src/interface/tcl/icons/back.gif | Bin 0 -> 1294 bytes .../src/interface/tcl/icons/bright.gif | Bin 0 -> 1294 bytes .../src/interface/tcl/icons/clear.gif | Bin 0 -> 862 bytes .../src/interface/tcl/icons/connect.gif | Bin 0 -> 2192 bytes .../src/interface/tcl/icons/continue.gif | Bin 0 -> 1836 bytes .../src/interface/tcl/icons/del_axis.gif | Bin 0 -> 1836 bytes .../src/interface/tcl/icons/excel.gif | Bin 0 -> 1844 bytes .../src/interface/tcl/icons/extract.gif | Bin 0 -> 1836 bytes .../src/interface/tcl/icons/help.gif | Bin 0 -> 1294 bytes .../src/interface/tcl/icons/imagebrowser.gif | Bin 0 -> 1844 bytes .../src/interface/tcl/icons/intensity.gif | Bin 0 -> 862 bytes .../src/interface/tcl/icons/linear.gif | Bin 0 -> 862 bytes .../src/interface/tcl/icons/loadexp.gif | Bin 0 -> 1844 bytes .../src/interface/tcl/icons/pan.gif | Bin 0 -> 1532 bytes .../src/interface/tcl/icons/params.gif | Bin 0 -> 1844 bytes .../src/interface/tcl/icons/plans.gif | Bin 0 -> 1844 bytes .../src/interface/tcl/icons/quant.gif | Bin 0 -> 2233 bytes .../src/interface/tcl/icons/redblue.gif | Bin 0 -> 1312 bytes .../src/interface/tcl/icons/redgreen.gif | Bin 0 -> 1312 bytes .../src/interface/tcl/icons/rotate.gif | Bin 0 -> 1836 bytes .../src/interface/tcl/icons/save.gif | Bin 0 -> 1844 bytes .../src/interface/tcl/icons/subtract.gif | Bin 0 -> 1844 bytes .../src/interface/tcl/icons/wizard.gif | Bin 0 -> 2460 bytes .../src/interface/tcl/icons/zoom.gif | Bin 0 -> 1532 bytes .../src/interface/tcl/marTcl.dsp | 142 + .../src/interface/tcl/marTclInterface.h | 469 ++ .../src/interface/tcl/maracas_start.tcl | 42 + .../src/interface/tcl/string_table.tcl | 185 + .../src/interface/tcl/tclexe.dsp | 241 + .../src/interface/tcl/tkwidgets/Makefile.am | 9 + .../src/interface/tcl/tkwidgets/Makefile.in | 224 + .../src/interface/tcl/tkwidgets/combobox.tcl | 1989 +++++ .../src/interface/tcl/tkwidgets/ibrowser.tcl | 1453 ++++ .../src/interface/tcl/tkwidgets/imagepp.tcl | 1697 +++++ .../src/interface/tcl/tkwidgets/mclistbox.tcl | 2604 +++++++ .../src/interface/tcl/to_change/Makefile.am | 11 + .../src/interface/tcl/to_change/Makefile.in | 224 + .../tcl/to_change/TkImageViewerInteractor.tcl | 258 + .../interface/tcl/to_change/TkInteractor.tcl | 580 ++ .../interface/tcl/to_change/WidgetObject.tcl | 52 + .../interface/tcl/to_change/ev_userzoom.tcl | 496 ++ .../tcl/to_change/volTkInteractor.tcl | 431 ++ .../src/interface/tcl/to_change/vtkInt.tcl | 99 + .../src/interface/tcl/windows/Makefile.am | 20 + .../src/interface/tcl/windows/Makefile.in | 330 + .../tcl/windows/choose_direction.tcl | 118 + .../interface/tcl/windows/data_browser.tcl | 416 ++ .../interface/tcl/windows/dlg_name_axis.tcl | 83 + .../src/interface/tcl/windows/dlg_params.tcl | 1301 ++++ .../interface/tcl/windows/global_window.tcl | 900 +++ .../src/interface/tcl/windows/help_wnd.tcl | 68 + .../interface/tcl/windows/image_browser.tcl | 591 ++ .../interface/tcl/windows/planes_window.tcl | 2932 ++++++++ .../src/interface/tcl/windows/subtract.tcl | 182 + .../src/interface/tcl/windows/u_3D.tcl | 293 + .../src/interface/tcl/windows/u_mip.tcl | 237 + .../src/interface/tcl/windows/u_mpr.tcl | 687 ++ .../src/interface/tcl/windows/u_surf.tcl | 1655 +++++ .../src/interface/tcl/wrap_maracas.i | 216 + .../src/interface/wxWindows/CMakeLists.txt | 631 ++ .../wxWindows/Contour/AutoControlPoints.cxx | 1723 +++++ .../wxWindows/Contour/AutoControlPoints.h | 112 + .../wxWindows/Contour/ContourCrownWidget.cxx | 686 ++ .../wxWindows/Contour/ContourCrownWidget.h | 112 + .../wxWindows/Contour/ContourExtractData.cxx | 469 ++ .../wxWindows/Contour/ContourExtractData.h | 71 + .../wxWindows/Contour/ContourPropagation.cxx | 316 + .../wxWindows/Contour/ContourPropagation.h | 73 + .../wxWindows/Contour/ContourVOIWidget.cxx | 211 + .../wxWindows/Contour/ContourVOIWidget.h | 72 + .../Contour/ExtractControlPoints2D.cxx | 113 + .../Contour/ExtractControlPoints2D.h | 37 + .../wxWindows/Contour/Propagation.cxx | 1237 ++++ .../interface/wxWindows/Contour/Propagation.h | 101 + .../Contour/contoursIntersection.cxx | 38 + .../wxWindows/Contour/contoursIntersection.h | 50 + .../wxWindows/Contour/vectorFunctions.cxx | 176 + .../wxWindows/Contour/vectorFunctions.h | 30 + .../src/interface/wxWindows/MaracasDll.cpp | 195 + .../src/interface/wxWindows/MaracasDll.h | 68 + .../src/interface/wxWindows/StdAfx.cpp | 8 + .../src/interface/wxWindows/StdAfx.h | 29 + .../src/interface/wxWindows/manualContour.cpp | 5127 +++++++++++++ .../src/interface/wxWindows/manualContour.h | 978 +++ .../wxWindows/manualContourContainer.cxx | 738 ++ .../wxWindows/manualContourContainer.h | 113 + .../src/interface/wxWindows/marDict.txt | 277 + .../src/interface/wxWindows/marDictionary.cxx | 455 ++ .../src/interface/wxWindows/marDictionary.h | 50 + .../interface/wxWindows/res/bitmaps/3D.bmp | Bin 0 -> 2038 bytes .../interface/wxWindows/res/bitmaps/3D.xpm | 87 + .../wxWindows/res/bitmaps/Axis_JF.bmp | Bin 0 -> 3278 bytes .../wxWindows/res/bitmaps/Axis_JF.xpm | 309 + .../wxWindows/res/bitmaps/Axis_JF_MH1.bmp | Bin 0 -> 3278 bytes .../wxWindows/res/bitmaps/Axis_JF_MH1.xpm | 309 + .../wxWindows/res/bitmaps/Axis_JF_MH2.bmp | Bin 0 -> 3278 bytes .../wxWindows/res/bitmaps/Axis_JF_MH2.xpm | 309 + .../interface/wxWindows/res/bitmaps/MPR.bmp | Bin 0 -> 3278 bytes .../interface/wxWindows/res/bitmaps/MPR.xpm | 309 + .../wxWindows/res/bitmaps/ProcessingCT.bmp | Bin 0 -> 3278 bytes .../wxWindows/res/bitmaps/ProcessingCT.xpm | 309 + .../res/bitmaps/QuantificationCT.bmp | Bin 0 -> 3278 bytes .../res/bitmaps/QuantificationCT.xpm | 309 + .../interface/wxWindows/res/bitmaps/add.bmp | Bin 0 -> 2878 bytes .../interface/wxWindows/res/bitmaps/add.xpm | 101 + .../interface/wxWindows/res/bitmaps/area.bmp | Bin 0 -> 2558 bytes .../interface/wxWindows/res/bitmaps/area.xpm | 47 + .../wxWindows/res/bitmaps/authors.bmp | Bin 0 -> 900054 bytes .../wxWindows/res/bitmaps/authors.xpm | 860 +++ .../interface/wxWindows/res/bitmaps/back.bmp | Bin 0 -> 2038 bytes .../interface/wxWindows/res/bitmaps/back.xpm | 72 + .../wxWindows/res/bitmaps/bright.bmp | Bin 0 -> 2878 bytes .../wxWindows/res/bitmaps/bright.xpm | 71 + .../interface/wxWindows/res/bitmaps/clear.bmp | Bin 0 -> 2558 bytes .../interface/wxWindows/res/bitmaps/clear.xpm | 47 + .../wxWindows/res/bitmaps/colours.bmp | Bin 0 -> 122 bytes .../wxWindows/res/bitmaps/colours.xpm | 13 + .../wxWindows/res/bitmaps/connect.bmp | Bin 0 -> 3278 bytes .../wxWindows/res/bitmaps/connect.xpm | 87 + .../wxWindows/res/bitmaps/continue.bmp | Bin 0 -> 2878 bytes .../wxWindows/res/bitmaps/continue.xpm | 94 + .../wxWindows/res/bitmaps/creatis_logo.bmp | Bin 0 -> 2758 bytes .../wxWindows/res/bitmaps/creatis_logo.xpm | 279 + .../wxWindows/res/bitmaps/creatis_logo2.bmp | Bin 0 -> 7638 bytes .../interface/wxWindows/res/bitmaps/cross.bmp | Bin 0 -> 198 bytes .../interface/wxWindows/res/bitmaps/cross.xpm | 18 + .../wxWindows/res/bitmaps/cutter.bmp | Bin 0 -> 3534 bytes .../wxWindows/res/bitmaps/cutter.xpm | 322 + .../wxWindows/res/bitmaps/del_axis.bmp | Bin 0 -> 4678 bytes .../wxWindows/res/bitmaps/del_axis.xpm | 95 + .../wxWindows/res/bitmaps/disable.bmp | Bin 0 -> 630 bytes .../wxWindows/res/bitmaps/disable.xpm | 40 + .../interface/wxWindows/res/bitmaps/excel.bmp | Bin 0 -> 3278 bytes .../interface/wxWindows/res/bitmaps/excel.xpm | 77 + .../interface/wxWindows/res/bitmaps/exit.bmp | Bin 0 -> 246 bytes .../interface/wxWindows/res/bitmaps/exit.xpm | 27 + .../wxWindows/res/bitmaps/extract.bmp | Bin 0 -> 4678 bytes .../wxWindows/res/bitmaps/extract.xpm | 95 + .../interface/wxWindows/res/bitmaps/help.bmp | Bin 0 -> 2038 bytes .../interface/wxWindows/res/bitmaps/help.xpm | 65 + .../wxWindows/res/bitmaps/imagebrowser.bmp | Bin 0 -> 3278 bytes .../wxWindows/res/bitmaps/imagebrowser.xpm | 76 + .../wxWindows/res/bitmaps/intensity.bmp | Bin 0 -> 2558 bytes .../wxWindows/res/bitmaps/intensity.xpm | 47 + .../wxWindows/res/bitmaps/linear.bmp | Bin 0 -> 2558 bytes .../wxWindows/res/bitmaps/linear.xpm | 48 + .../wxWindows/res/bitmaps/loadexp.bmp | Bin 0 -> 3278 bytes .../wxWindows/res/bitmaps/loadexp.xpm | 73 + .../interface/wxWindows/res/bitmaps/logo.bmp | Bin 0 -> 3878 bytes .../interface/wxWindows/res/bitmaps/logo.xpm | 94 + .../wxWindows/res/bitmaps/logocreatis.bmp | Bin 0 -> 150490 bytes .../interface/wxWindows/res/bitmaps/pan.bmp | Bin 0 -> 2878 bytes .../interface/wxWindows/res/bitmaps/pan.xpm | 74 + .../wxWindows/res/bitmaps/params.bmp | Bin 0 -> 2038 bytes .../wxWindows/res/bitmaps/params.xpm | 74 + .../interface/wxWindows/res/bitmaps/plans.bmp | Bin 0 -> 2038 bytes .../interface/wxWindows/res/bitmaps/plans.xpm | 83 + .../interface/wxWindows/res/bitmaps/quant.bmp | Bin 0 -> 2038 bytes .../interface/wxWindows/res/bitmaps/quant.xpm | 78 + .../wxWindows/res/bitmaps/redblue.bmp | Bin 0 -> 3318 bytes .../wxWindows/res/bitmaps/redblue.xpm | 37 + .../wxWindows/res/bitmaps/redgreen.bmp | Bin 0 -> 3318 bytes .../wxWindows/res/bitmaps/redgreen.xpm | 37 + .../wxWindows/res/bitmaps/rotate.bmp | Bin 0 -> 2878 bytes .../wxWindows/res/bitmaps/rotate.xpm | 95 + .../interface/wxWindows/res/bitmaps/save.bmp | Bin 0 -> 3278 bytes .../interface/wxWindows/res/bitmaps/save.xpm | 73 + .../interface/wxWindows/res/bitmaps/stl.bmp | Bin 0 -> 1474 bytes .../interface/wxWindows/res/bitmaps/stl.xpm | 55 + .../wxWindows/res/bitmaps/subtract.bmp | Bin 0 -> 3278 bytes .../wxWindows/res/bitmaps/subtract.xpm | 79 + .../interface/wxWindows/res/bitmaps/tick.bmp | Bin 0 -> 198 bytes .../interface/wxWindows/res/bitmaps/tick.xpm | 18 + .../wxWindows/res/bitmaps/vessels.bmp | Bin 0 -> 2774 bytes .../wxWindows/res/bitmaps/vessels.xpm | 56 + .../wxWindows/res/bitmaps/wizard.bmp | Bin 0 -> 2038 bytes .../wxWindows/res/bitmaps/wizard.xpm | 95 + .../interface/wxWindows/res/bitmaps/zoom.bmp | Bin 0 -> 2038 bytes .../interface/wxWindows/res/bitmaps/zoom.xpm | 76 + .../wxWindows/res/bitmaps2/maracas_01.xcf | Bin 0 -> 107860 bytes .../wxWindows/res/bitmaps2/maracas_02.xcf | Bin 0 -> 49112 bytes .../bitmaps2/v2_bi_bl_CTQuantification.bmp | Bin 0 -> 30054 bytes .../bitmaps2/v2_bi_bl_CTQuantification.xpm | 820 +++ .../bitmaps2/v2_bi_bl_IRMQuantification.bmp | Bin 0 -> 30054 bytes .../bitmaps2/v2_bi_bl_IRMQuantification.xpm | 820 +++ .../res/bitmaps2/v2_bi_bl_Information.bmp | Bin 0 -> 30054 bytes .../res/bitmaps2/v2_bi_bl_Information.xpm | 977 +++ .../res/bitmaps2/v2_bi_bl_ListPatient_Voi.bmp | Bin 0 -> 11078 bytes .../res/bitmaps2/v2_bi_bl_ListPatient_Voi.xpm | 359 + .../wxWindows/res/bitmaps2/v2_bi_bl_Logo.bmp | Bin 0 -> 30054 bytes .../wxWindows/res/bitmaps2/v2_bi_bl_Logo.xpm | 355 + .../bitmaps2/v2_bi_bl_ManualRegistration.bmp | Bin 0 -> 30054 bytes .../bitmaps2/v2_bi_bl_ManualRegistration.xpm | 738 ++ .../res/bitmaps2/v2_bi_bl_Params.bmp | Bin 0 -> 30054 bytes .../res/bitmaps2/v2_bi_bl_Params.xpm | 405 ++ .../res/bitmaps2/v2_bi_bl_Processing.bmp | Bin 0 -> 30054 bytes .../res/bitmaps2/v2_bi_bl_Processing.xpm | 476 ++ .../res/bitmaps2/v2_bi_bl_STLFormat.bmp | Bin 0 -> 30054 bytes .../res/bitmaps2/v2_bi_bl_STLFormat.xpm | 576 ++ .../wxWindows/res/bitmaps2/v2_bi_bl_Tests.bmp | Bin 0 -> 30054 bytes .../wxWindows/res/bitmaps2/v2_bi_bl_Tests.xpm | 660 ++ .../res/bitmaps2/v2_bi_bl_VascularTree.bmp | Bin 0 -> 30054 bytes .../res/bitmaps2/v2_bi_bl_VascularTree.xpm | 541 ++ .../wxWindows/res/bitmaps2/v2_bi_mask.bmp | Bin 0 -> 1662 bytes .../wxWindows/res/bitmaps2/v2_bi_mask.xpm | 105 + .../bitmaps2/v2_bi_re_CTQuantification.bmp | Bin 0 -> 30054 bytes .../bitmaps2/v2_bi_re_CTQuantification.xpm | 823 +++ .../bitmaps2/v2_bi_re_IRMQuantification.bmp | Bin 0 -> 30054 bytes .../bitmaps2/v2_bi_re_IRMQuantification.xpm | 823 +++ .../res/bitmaps2/v2_bi_re_ListPatient_Voi.bmp | Bin 0 -> 8290 bytes .../res/bitmaps2/v2_bi_re_ListPatient_Voi.xpm | 358 + .../wxWindows/res/bitmaps2/v2_bi_re_Logo.bmp | Bin 0 -> 30054 bytes .../wxWindows/res/bitmaps2/v2_bi_re_Logo.xpm | 359 + .../bitmaps2/v2_bi_re_ManualRegistration.bmp | Bin 0 -> 30054 bytes .../bitmaps2/v2_bi_re_ManualRegistration.xpm | 742 ++ .../res/bitmaps2/v2_bi_re_Params.bmp | Bin 0 -> 30054 bytes .../res/bitmaps2/v2_bi_re_Params.xpm | 406 ++ .../res/bitmaps2/v2_bi_re_Processing.bmp | Bin 0 -> 30054 bytes .../res/bitmaps2/v2_bi_re_Processing.xpm | 429 ++ .../res/bitmaps2/v2_bi_re_STLFormat.bmp | Bin 0 -> 30054 bytes .../res/bitmaps2/v2_bi_re_STLFormat.xpm | 580 ++ .../wxWindows/res/bitmaps2/v2_bi_re_Tests.bmp | Bin 0 -> 30054 bytes .../wxWindows/res/bitmaps2/v2_bi_re_Tests.xpm | 662 ++ .../res/bitmaps2/v2_bi_re_VascularTree.bmp | Bin 0 -> 30054 bytes .../res/bitmaps2/v2_bi_re_VascularTree.xpm | 546 ++ .../res/bitmaps2/v2_sm_bl_AddAllPatients.bmp | Bin 0 -> 7654 bytes .../res/bitmaps2/v2_sm_bl_AddAllPatients.xpm | 1156 +++ .../res/bitmaps2/v2_sm_bl_AddPatient.bmp | Bin 0 -> 7654 bytes .../res/bitmaps2/v2_sm_bl_AddPatient.xpm | 1120 +++ .../res/bitmaps2/v2_sm_bl_AxisExtraction.bmp | Bin 0 -> 7654 bytes .../res/bitmaps2/v2_sm_bl_AxisExtraction.xpm | 808 +++ .../res/bitmaps2/v2_sm_bl_CreateDICOMDIR.bmp | Bin 0 -> 7654 bytes .../res/bitmaps2/v2_sm_bl_CreateDICOMDIR.xpm | 1152 +++ .../res/bitmaps2/v2_sm_bl_ListPatient.bmp | Bin 0 -> 7654 bytes .../res/bitmaps2/v2_sm_bl_ListPatient.xpm | 791 ++ .../wxWindows/res/bitmaps2/v2_sm_bl_MPR.bmp | Bin 0 -> 7654 bytes .../wxWindows/res/bitmaps2/v2_sm_bl_MPR.xpm | 824 +++ .../res/bitmaps2/v2_sm_bl_OpenDICOMDIR.bmp | Bin 0 -> 7654 bytes .../res/bitmaps2/v2_sm_bl_OpenDICOMDIR.xpm | 1068 +++ .../res/bitmaps2/v2_sm_bl_OpenDirectory.bmp | Bin 0 -> 7654 bytes .../res/bitmaps2/v2_sm_bl_OpenDirectory.xpm | 814 +++ .../res/bitmaps2/v2_sm_bl_Processing.bmp | Bin 0 -> 7654 bytes .../res/bitmaps2/v2_sm_bl_Processing.xpm | 791 ++ .../res/bitmaps2/v2_sm_bl_ProcessingCT.bmp | Bin 0 -> 7654 bytes .../res/bitmaps2/v2_sm_bl_ProcessingCT.xpm | 921 +++ .../res/bitmaps2/v2_sm_bl_Quantification.bmp | Bin 0 -> 7654 bytes .../res/bitmaps2/v2_sm_bl_Quantification.xpm | 948 +++ .../res/bitmaps2/v2_sm_bl_STLFormat.bmp | Bin 0 -> 7654 bytes .../res/bitmaps2/v2_sm_bl_STLFormat.xpm | 915 +++ .../v2_sm_bl_TreeExtraction_JF_MH.bmp | Bin 0 -> 7654 bytes .../v2_sm_bl_TreeExtraction_JF_MH.xpm | 1167 +++ .../wxWindows/res/bitmaps2/v2_sm_bl_voi.bmp | Bin 0 -> 7654 bytes .../wxWindows/res/bitmaps2/v2_sm_bl_voi.xpm | 865 +++ .../wxWindows/res/bitmaps2/v2_sm_mask.bmp | Bin 0 -> 462 bytes .../wxWindows/res/bitmaps2/v2_sm_mask.xpm | 55 + .../res/bitmaps2/v2_sm_re_ListPatient.bmp | Bin 0 -> 7654 bytes .../res/bitmaps2/v2_sm_re_ListPatient.xpm | 804 +++ .../wxWindows/res/bitmaps2/v2_sm_re_voi.bmp | Bin 0 -> 7654 bytes .../wxWindows/res/bitmaps2/v2_sm_re_voi.xpm | 874 +++ .../wxWindows/res/bitmaps2/v2_sm_tr_MPR.bmp | Bin 0 -> 7654 bytes .../wxWindows/res/bitmaps2/v2_sm_tr_MPR.xpm | 566 ++ .../res/bitmaps2/v2_sm_tr_Processing.bmp | Bin 0 -> 7654 bytes .../res/bitmaps2/v2_sm_tr_Processing.xpm | 576 ++ .../res/bitmaps2/v2_sm_tr_Quantification.bmp | Bin 0 -> 7654 bytes .../res/bitmaps2/v2_sm_tr_Quantification.xpm | 615 ++ .../res/bitmaps2/v2_sm_tr_STLFormat.bmp | Bin 0 -> 7654 bytes .../res/bitmaps2/v2_sm_tr_STLFormat.xpm | 594 ++ .../wxWindows/res/bitmaps2/v2_sm_tr_VOI.bmp | Bin 0 -> 7654 bytes .../wxWindows/res/bitmaps2/v2_sm_tr_VOI.xpm | 577 ++ .../wxWindows/res/dialogs/marDiagParameters.h | 172 + .../res/dialogs/marDiagParameters.wxr | 264 + .../wxWindows/res/dialogs/ressource.wxg | 1133 +++ .../interface/wxWindows/res/icons/maracas.ico | Bin 0 -> 766 bytes .../interface/wxWindows/res/icons/maracas.xpm | 44 + .../interface/wxWindows/res/wxInterface.rc | 84 + .../interface/wxWindows/tools/CMakeLists.txt | 31 + .../wxWindows/tools/MaracasTools.cpp | 245 + .../interface/wxWindows/tools/MaracasTools.h | 83 + .../wxWindows/widgets/ContourView.cxx | 88 + .../interface/wxWindows/widgets/ContourView.h | 49 + .../widgets/InterfaceVtkPanelWidgets.cxx | 28 + .../widgets/InterfaceVtkPanelWidgets.h | 30 + .../interface/wxWindows/widgets/LineView.cxx | 94 + .../interface/wxWindows/widgets/LineView.h | 37 + .../interface/wxWindows/widgets/PointView.cxx | 92 + .../interface/wxWindows/widgets/PointView.h | 47 + .../src/interface/wxWindows/widgets/README | 10 + .../widgets/UtilVtk3DGeometriSelection.cxx | 284 + .../widgets/UtilVtk3DGeometriSelection.h | 51 + .../src/interface/wxWindows/widgets/chart.cpp | 1034 +++ .../src/interface/wxWindows/widgets/chart.h | 213 + .../wxWindows/widgets/pPlotter/Histogram.cxx | 153 + .../wxWindows/widgets/pPlotter/Histogram.h | 81 + .../widgets/pPlotter/HistogramDialog.cxx | 490 ++ .../widgets/pPlotter/HistogramDialog.h | 178 + .../widgets/pPlotter/HistogramWidget.cxx | 345 + .../widgets/pPlotter/HistogramWidget.h | 167 + .../widgets/pPlotter/LogicalColorBar.cxx | 308 + .../widgets/pPlotter/LogicalColorBar.h | 113 + .../widgets/pPlotter/MaximumsDialog.cxx | 77 + .../widgets/pPlotter/MaximumsDialog.h | 94 + .../wxWindows/widgets/pPlotter/mBarRange.cxx | 1397 ++++ .../wxWindows/widgets/pPlotter/mBarRange.h | 449 ++ .../wxWindows/widgets/pPlotter/mathplot.cxx | 739 ++ .../wxWindows/widgets/pPlotter/mathplot.h | 887 +++ .../wxWindows/widgets/pPlotter/pColorBar.cxx | 1526 ++++ .../wxWindows/widgets/pPlotter/pColorBar.h | 762 ++ .../widgets/pPlotter/pColorPoint.cxx | 71 + .../wxWindows/widgets/pPlotter/pColorPoint.h | 98 + .../wxWindows/widgets/pPlotter/pFigure.cxx | 288 + .../wxWindows/widgets/pPlotter/pFigure.h | 163 + .../widgets/pPlotter/pFunctionPoint.cxx | 69 + .../widgets/pPlotter/pFunctionPoint.h | 99 + .../widgets/pPlotter/pGraphicalFunction.cxx | 847 +++ .../widgets/pPlotter/pGraphicalFunction.h | 1021 +++ .../wxWindows/widgets/pPlotter/pHistogram.cxx | 270 + .../wxWindows/widgets/pPlotter/pHistogram.h | 156 + .../widgets/pPlotter/pLogicalFunction.cxx | 806 +++ .../widgets/pPlotter/pLogicalFunction.h | 368 + .../wxWindows/widgets/pPlotter/pPlotter.cxx | 721 ++ .../wxWindows/widgets/pPlotter/pPlotter.h | 246 + .../widgets/pPlotter/pPlotterLayer.cxx | 628 ++ .../widgets/pPlotter/pPlotterLayer.h | 257 + .../widgets/pPlotter/pPlotterScaleX.cxx | 103 + .../widgets/pPlotter/pPlotterScaleX.h | 49 + .../widgets/pPlotter/pPlotterScaleY.cxx | 103 + .../widgets/pPlotter/pPlotterScaleY.h | 50 + .../widgets/pPlotter/pPlotterWindow.cxx | 1856 +++++ .../widgets/pPlotter/pPlotterWindow.h | 404 ++ .../interface/wxWindows/widgets/res/area.xpm | 297 + .../wxWindows/widgets/res/bright.xpm | 310 + .../wxWindows/widgets/res/cine_loop.xpm | 310 + .../interface/wxWindows/widgets/res/clear.xpm | 297 + .../wxWindows/widgets/res/intensity.xpm | 297 + .../wxWindows/widgets/res/linear.xpm | 297 + .../widgets/vtk2DQuantSliceWidget.cxx | 189 + .../wxWindows/widgets/vtk2DQuantSliceWidget.h | 78 + .../widgets/vtk3DQuantSurfaceWidget.cxx | 610 ++ .../widgets/vtk3DQuantSurfaceWidget.h | 161 + .../widgets/vtk3DSurfaceSTLWidget.cxx | 817 +++ .../wxWindows/widgets/vtk3DSurfaceSTLWidget.h | 136 + .../wxWindows/widgets/vtk3DSurfaceWidget.cxx | 515 ++ .../wxWindows/widgets/vtk3DSurfaceWidget.h | 134 + .../wxWindows/widgets/vtkClosePolyData.cxx | 94 + .../wxWindows/widgets/vtkClosePolyData.h | 57 + .../vtkImagePolyDataSeedConnectivity.cxx | 423 ++ .../vtkImagePolyDataSeedConnectivity.h | 69 + .../widgets/vtkInteractorStyleCutter.cxx | 192 + .../widgets/vtkInteractorStyleCutter.h | 82 + .../interface/wxWindows/widgets/wxChart.cxx | 954 +++ .../src/interface/wxWindows/widgets/wxChart.h | 219 + .../wxWindows/widgets/wxEmptyPanelWidget.cxx | 282 + .../wxWindows/widgets/wxEmptyPanelWidget.h | 63 + .../widgets/wxEmptyPanelWidget_2.cxx | 1075 +++ .../wxWindows/widgets/wxEmptyPanelWidget_2.h | 149 + .../widgets/wxEmptyPanel_3_Widget.cxx | 283 + .../wxWindows/widgets/wxEmptyPanel_3_Widget.h | 59 + .../wxWindows/widgets/wxImageBrowserWdg.cxx | 257 + .../wxWindows/widgets/wxImageBrowserWdg.h | 74 + .../wxWindows/widgets/wxImageViewerWidget.cxx | 630 ++ .../wxWindows/widgets/wxImageViewerWidget.h | 138 + .../wxWindows/widgets/wxMPRBaseData.cxx | 1112 +++ .../wxWindows/widgets/wxMPRBaseData.h | 344 + .../wxWindows/widgets/wxMPRWidget.cxx | 6365 +++++++++++++++++ .../interface/wxWindows/widgets/wxMPRWidget.h | 1029 +++ .../widgets/wxManualRegistration3D.cxx | 504 ++ .../widgets/wxManualRegistration3D.h | 122 + .../wxManualSegmentation_MPRWidget.cxx | 207 + .../widgets/wxManualSegmentation_MPRWidget.h | 79 + .../widgets/wxManualTree_MPRWidget.cxx | 353 + .../widgets/wxManualTree_MPRWidget.h | 117 + .../widgets/wxMaracas_N_ViewersWidget.cxx | 249 + .../widgets/wxMaracas_N_ViewersWidget.h | 95 + .../widgets/wxMaracas_ViewerWidget.cxx | 248 + .../widgets/wxMaracas_ViewerWidget.h | 99 + .../wxWindows/widgets/wxParametersDialog.cpp | 379 + .../wxWindows/widgets/wxParametersDialog.h | 156 + .../widgets/wxPathologyWidget_01.cxx | 1316 ++++ .../wxWindows/widgets/wxPathologyWidget_01.h | 201 + .../widgets/wxProcessingCTWidget.cxx | 597 ++ .../wxWindows/widgets/wxProcessingCTWidget.h | 116 + .../widgets/wxQuantificationWidget.cxx | 2298 ++++++ .../widgets/wxQuantificationWidget.h | 371 + .../widgets/wxQuantificationWidgetCT.cxx | 2149 ++++++ .../widgets/wxQuantificationWidgetCT.h | 452 ++ .../widgets/wxQuantificationWidget_base.cxx | 1339 ++++ .../widgets/wxQuantificationWidget_base.h | 312 + .../widgets/wxReadingPriorityPanel.cpp | 1172 +++ .../widgets/wxReadingPriorityPanel.h | 299 + .../wxWindows/widgets/wxSTLWidget_02.cxx | 726 ++ .../wxWindows/widgets/wxSTLWidget_02.h | 167 + .../wxWindows/widgets/wxSTLWidget_03.cxx | 1033 +++ .../wxWindows/widgets/wxSTLWidget_03.h | 197 + .../widgets/wxSegmentationFM3DWidget.cxx | 426 ++ .../widgets/wxSegmentationFM3DWidget.h | 144 + .../wxWindows/widgets/wxSurfaceMPR.cxx | 1226 ++++ .../wxWindows/widgets/wxSurfaceMPR.h | 287 + .../wxWindows/widgets/wxSurfaceSTLWidget.cxx | 310 + .../wxWindows/widgets/wxSurfaceSTLWidget.h | 111 + .../wxWindows/widgets/wxSurfaceWidget.cxx | 455 ++ .../wxWindows/widgets/wxSurfaceWidget.h | 116 + .../widgets/wxVTKRenderWindowInteractor.cxx | 768 ++ .../widgets/wxVTKRenderWindowInteractor.h | 176 + ...wxVTKRenderWindowInteractorEditContour.cxx | 328 + .../wxVTKRenderWindowInteractorEditContour.h | 221 + .../wxWindows/widgets/wxVtkBaseView.cxx | 1737 +++++ .../wxWindows/widgets/wxVtkBaseView.h | 449 ++ .../interface/wxWindows/wxILPDwithImage.cxx | 452 ++ .../src/interface/wxWindows/wxILPDwithImage.h | 63 + .../wxWindows/wxMaracas3DBrowser.cxx | 76 + .../interface/wxWindows/wxMaracas3DBrowser.h | 48 + .../src/interface/wxWindows/wxMaracasApp.cxx | 1180 +++ .../src/interface/wxWindows/wxMaracasApp.h | 69 + .../interface/wxWindows/wxMaracasApp02.cxx | 253 + .../src/interface/wxWindows/wxMaracasApp02.h | 61 + .../wxWindows/wxMaracasDataBrowser.cxx | 389 + .../wxWindows/wxMaracasDataBrowser.h | 70 + .../wxWindows/wxMaracasEmptyPanel.cxx | 50 + .../interface/wxWindows/wxMaracasEmptyPanel.h | 41 + .../wxWindows/wxMaracasEmptyPanel_2.cxx | 47 + .../wxWindows/wxMaracasEmptyPanel_2.h | 42 + .../wxWindows/wxMaracasEmptyPanel_3.cxx | 867 +++ .../wxWindows/wxMaracasEmptyPanel_3.h | 106 + .../interface/wxWindows/wxMaracasFrame.cxx | 476 ++ .../src/interface/wxWindows/wxMaracasFrame.h | 106 + .../interface/wxWindows/wxMaracasFrame02.cxx | 4241 +++++++++++ .../interface/wxWindows/wxMaracasFrame02.h | 661 ++ .../wxWindows/wxMaracasHelpDialog.cxx | 197 + .../interface/wxWindows/wxMaracasHelpDialog.h | 44 + .../wxWindows/wxMaracasImageBrowser.cxx | 62 + .../wxWindows/wxMaracasImageBrowser.h | 50 + .../wxWindows/wxMaracasImageBrowser02.cxx | 291 + .../wxWindows/wxMaracasImageBrowser02.h | 96 + .../src/interface/wxWindows/wxMaracasMPR.cxx | 71 + .../src/interface/wxWindows/wxMaracasMPR.h | 47 + .../wxWindows/wxMaracasParametersDialog.cxx | 578 ++ .../wxWindows/wxMaracasParametersDialog.h | 69 + .../wxWindows/wxMaracasPathology_01.cxx | 53 + .../wxWindows/wxMaracasPathology_01.h | 42 + .../wxWindows/wxMaracasProcessingCT.cxx | 66 + .../wxWindows/wxMaracasProcessingCT.h | 47 + .../wxWindows/wxMaracasQuantification.cxx | 92 + .../wxWindows/wxMaracasQuantification.h | 47 + .../wxWindows/wxMaracasQuantificationCT.cxx | 106 + .../wxWindows/wxMaracasQuantificationCT.h | 49 + .../wxMaracas_ManualContour_Panel.cxx | 175 + .../wxWindows/wxMaracas_ManualContour_Panel.h | 64 + .../wxMaracas_ManualSegmentation_MPR.cxx | 72 + .../wxMaracas_ManualSegmentation_MPR.h | 48 + .../wxWindows/wxMaracas_ManualTree_MPR.cxx | 78 + .../wxWindows/wxMaracas_ManualTree_MPR.h | 49 + .../wxWindows/wxMaracas_ManualTree_MPRDlg.cxx | 121 + .../wxWindows/wxMaracas_ManualTree_MPRDlg.h | 51 + .../wxWindows/wxMaracas_SegmentationFM3D.cxx | 73 + .../wxWindows/wxMaracas_SegmentationFM3D.h | 48 + lib/maracasVisuLib/src/kernel/CMakeLists.txt | 96 + lib/maracasVisuLib/src/kernel/README | 8 + .../src/kernel/axisExtractor.cxx | 1143 +++ lib/maracasVisuLib/src/kernel/axisExtractor.h | 166 + .../src/kernel/axisExtractor02.cxx | 4026 +++++++++++ .../src/kernel/axisExtractor02.h | 385 + .../src/kernel/carotidaBifurcacion.cxx | 1054 +++ .../src/kernel/carotidaBifurcacion.h | 123 + lib/maracasVisuLib/src/kernel/curve.cxx | 580 ++ lib/maracasVisuLib/src/kernel/curve.hxx | 104 + lib/maracasVisuLib/src/kernel/gslobj.hxx | 261 + lib/maracasVisuLib/src/kernel/itkFM3D.cxx | 416 ++ lib/maracasVisuLib/src/kernel/itkFM3D.h | 36 + .../src/kernel/itkImageToVTKImageFilter.h | 103 + .../src/kernel/itkImageToVTKImageFilter.txx | 144 + .../src/kernel/itkVTKImageToImageFilter.h | 107 + .../src/kernel/itkVTKImageToImageFilter.txx | 144 + lib/maracasVisuLib/src/kernel/marAxis.cpp | 1552 ++++ lib/maracasVisuLib/src/kernel/marAxis.h | 273 + lib/maracasVisuLib/src/kernel/marAxisCT.cpp | 2543 +++++++ lib/maracasVisuLib/src/kernel/marAxisCT.h | 123 + .../src/kernel/marAxisContours.cpp | 87 + .../src/kernel/marAxisContours.h | 51 + lib/maracasVisuLib/src/kernel/marContour.cpp | 503 ++ lib/maracasVisuLib/src/kernel/marContour.h | 130 + .../src/kernel/marContourVO.cpp | 183 + lib/maracasVisuLib/src/kernel/marContourVO.h | 100 + lib/maracasVisuLib/src/kernel/marDicom.cpp | 436 ++ lib/maracasVisuLib/src/kernel/marDicom.h | 181 + .../src/kernel/marDicomBase.cpp | 713 ++ lib/maracasVisuLib/src/kernel/marDicomBase.h | 110 + lib/maracasVisuLib/src/kernel/marDynData.cpp | 204 + lib/maracasVisuLib/src/kernel/marDynData.h | 59 + .../src/kernel/marExperiment.cpp | 392 + lib/maracasVisuLib/src/kernel/marExperiment.h | 126 + .../src/kernel/marExperimentCT.cpp | 226 + .../src/kernel/marExperimentCT.h | 66 + .../src/kernel/marGdcmDicom.cpp | 1060 +++ lib/maracasVisuLib/src/kernel/marGdcmDicom.h | 148 + .../src/kernel/marImageData.cpp | 133 + lib/maracasVisuLib/src/kernel/marImageData.h | 45 + .../src/kernel/marInterface.cpp | 227 + lib/maracasVisuLib/src/kernel/marInterface.h | 63 + .../src/kernel/marInterfaceCT.cpp | 506 ++ .../src/kernel/marInterfaceCT.h | 145 + .../src/kernel/marIsocontour.cpp | 138 + lib/maracasVisuLib/src/kernel/marIsocontour.h | 52 + lib/maracasVisuLib/src/kernel/marKVolume.cpp | 60 + lib/maracasVisuLib/src/kernel/marKVolume.h | 43 + lib/maracasVisuLib/src/kernel/marLine.cpp | 82 + lib/maracasVisuLib/src/kernel/marLine.h | 27 + lib/maracasVisuLib/src/kernel/marMathConst.h | 12 + lib/maracasVisuLib/src/kernel/marMatrix.cpp | 425 ++ lib/maracasVisuLib/src/kernel/marMatrix.h | 57 + lib/maracasVisuLib/src/kernel/marObject.cpp | 82 + lib/maracasVisuLib/src/kernel/marObject.h | 84 + .../src/kernel/marParameters.cpp | 509 ++ lib/maracasVisuLib/src/kernel/marParameters.h | 236 + lib/maracasVisuLib/src/kernel/marPoint.cpp | 102 + lib/maracasVisuLib/src/kernel/marPoint.h | 54 + .../src/kernel/marSimpleDicom.cpp | 596 ++ .../src/kernel/marSimpleDicom.h | 208 + lib/maracasVisuLib/src/kernel/marTypes.h | 96 + lib/maracasVisuLib/src/kernel/marUtils.cpp | 49 + lib/maracasVisuLib/src/kernel/marUtils.h | 21 + lib/maracasVisuLib/src/kernel/marVector.cpp | 720 ++ lib/maracasVisuLib/src/kernel/marVector.h | 97 + lib/maracasVisuLib/src/kernel/matrix.cxx | 488 ++ lib/maracasVisuLib/src/kernel/vector.cxx | 375 + lib/maracasVisuLib/src/kernel/volume.cxx | 1087 +++ lib/maracasVisuLib/src/kernel/volume.hxx | 259 + .../src/kernel/vtkDijkstraImageData.cxx | 734 ++ .../src/kernel/vtkDijkstraImageData.h | 162 + lib/maracasVisuLib/src/kernel/vtkJoiner.cxx | 40 + lib/maracasVisuLib/src/kernel/vtkJoiner.h | 17 + lib/maracasVisuLib/src/kernel/vtkOtsu.cxx | 162 + lib/maracasVisuLib/src/kernel/vtkOtsu.h | 32 + .../src/kernel/vtkOtsuImageData.cxx | 152 + .../src/kernel/vtkOtsuImageData.h | 28 + .../src/kernel/vtkOtsuSphereSource.cxx | 154 + .../src/kernel/vtkOtsuSphereSource.h | 29 + .../src/kernel/vtkSTLExtractor.cpp | 105 + .../src/kernel/vtkSTLExtractor.h | 48 + 576 files changed, 176400 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 appli/template_appli/CMakeLists.txt create mode 100644 appli/template_wx_appli/CMakeLists.txt create mode 100644 lib/CMakeLists.txt create mode 100644 lib/maracasVisuLib/CMakeLists.txt create mode 100644 lib/maracasVisuLib/include/Maracas.iss create mode 100644 lib/maracasVisuLib/include/Modules/FindCrea.cmake create mode 100644 lib/maracasVisuLib/include/Modules/FindGDCM.cmake create mode 100644 lib/maracasVisuLib/include/Modules/FindGLIB.cmake create mode 100644 lib/maracasVisuLib/include/Modules/FindGSL.cmake create mode 100644 lib/maracasVisuLib/include/Modules/FindGSLobj.cmake create mode 100644 lib/maracasVisuLib/include/Modules/FindGTK.cmake create mode 100644 lib/maracasVisuLib/include/Modules/FindGTK2.cmake create mode 100644 lib/maracasVisuLib/include/Modules/FindKGFO.cmake create mode 100644 lib/maracasVisuLib/include/Modules/FindLibido.cmake create mode 100644 lib/maracasVisuLib/include/Modules/FindMySQL.cmake create mode 100644 lib/maracasVisuLib/include/Modules/FindwxGlade.cmake create mode 100644 lib/maracasVisuLib/include/Modules/FindwxW.cmake create mode 100644 lib/maracasVisuLib/include/Modules/GDCMConfig.cmake create mode 100644 lib/maracasVisuLib/include/Modules/MARACAS_Find_GDCM.cmake create mode 100644 lib/maracasVisuLib/include/Modules/MARACAS_Find_ITK.cmake create mode 100644 lib/maracasVisuLib/include/Modules/MARACAS_Find_LIBIDO.cmake create mode 100644 lib/maracasVisuLib/include/Modules/MARACAS_Find_VTK.cmake create mode 100644 lib/maracasVisuLib/include/Modules/MARACAS_Find_WXWIDGETS.cmake create mode 100644 lib/maracasVisuLib/include/Modules/UseGDCM.cmake create mode 100644 lib/maracasVisuLib/include/mathdefs.h create mode 100644 lib/maracasVisuLib/include/matrix.h create mode 100644 lib/maracasVisuLib/include/vector.h create mode 100644 lib/maracasVisuLib/include/vmfuncs.h create mode 100644 lib/maracasVisuLib/src/CMakeLists.txt create mode 100644 lib/maracasVisuLib/src/CMakeListsWorking.txt create mode 100644 lib/maracasVisuLib/src/interface/CMakeLists.txt create mode 100644 lib/maracasVisuLib/src/interface/tcl/Makefile.am create mode 100644 lib/maracasVisuLib/src/interface/tcl/Makefile.in create mode 100644 lib/maracasVisuLib/src/interface/tcl/general.tcl create mode 100644 lib/maracasVisuLib/src/interface/tcl/icons/3D.gif create mode 100644 lib/maracasVisuLib/src/interface/tcl/icons/add.gif create mode 100644 lib/maracasVisuLib/src/interface/tcl/icons/area.gif create mode 100644 lib/maracasVisuLib/src/interface/tcl/icons/back.gif create mode 100644 lib/maracasVisuLib/src/interface/tcl/icons/bright.gif create mode 100644 lib/maracasVisuLib/src/interface/tcl/icons/clear.gif create mode 100644 lib/maracasVisuLib/src/interface/tcl/icons/connect.gif create mode 100644 lib/maracasVisuLib/src/interface/tcl/icons/continue.gif create mode 100644 lib/maracasVisuLib/src/interface/tcl/icons/del_axis.gif create mode 100644 lib/maracasVisuLib/src/interface/tcl/icons/excel.gif create mode 100644 lib/maracasVisuLib/src/interface/tcl/icons/extract.gif create mode 100644 lib/maracasVisuLib/src/interface/tcl/icons/help.gif create mode 100644 lib/maracasVisuLib/src/interface/tcl/icons/imagebrowser.gif create mode 100644 lib/maracasVisuLib/src/interface/tcl/icons/intensity.gif create mode 100644 lib/maracasVisuLib/src/interface/tcl/icons/linear.gif create mode 100644 lib/maracasVisuLib/src/interface/tcl/icons/loadexp.gif create mode 100644 lib/maracasVisuLib/src/interface/tcl/icons/pan.gif create mode 100644 lib/maracasVisuLib/src/interface/tcl/icons/params.gif create mode 100644 lib/maracasVisuLib/src/interface/tcl/icons/plans.gif create mode 100644 lib/maracasVisuLib/src/interface/tcl/icons/quant.gif create mode 100644 lib/maracasVisuLib/src/interface/tcl/icons/redblue.gif create mode 100644 lib/maracasVisuLib/src/interface/tcl/icons/redgreen.gif create mode 100644 lib/maracasVisuLib/src/interface/tcl/icons/rotate.gif create mode 100644 lib/maracasVisuLib/src/interface/tcl/icons/save.gif create mode 100644 lib/maracasVisuLib/src/interface/tcl/icons/subtract.gif create mode 100644 lib/maracasVisuLib/src/interface/tcl/icons/wizard.gif create mode 100644 lib/maracasVisuLib/src/interface/tcl/icons/zoom.gif create mode 100644 lib/maracasVisuLib/src/interface/tcl/marTcl.dsp create mode 100644 lib/maracasVisuLib/src/interface/tcl/marTclInterface.h create mode 100644 lib/maracasVisuLib/src/interface/tcl/maracas_start.tcl create mode 100644 lib/maracasVisuLib/src/interface/tcl/string_table.tcl create mode 100644 lib/maracasVisuLib/src/interface/tcl/tclexe.dsp create mode 100644 lib/maracasVisuLib/src/interface/tcl/tkwidgets/Makefile.am create mode 100644 lib/maracasVisuLib/src/interface/tcl/tkwidgets/Makefile.in create mode 100644 lib/maracasVisuLib/src/interface/tcl/tkwidgets/combobox.tcl create mode 100644 lib/maracasVisuLib/src/interface/tcl/tkwidgets/ibrowser.tcl create mode 100644 lib/maracasVisuLib/src/interface/tcl/tkwidgets/imagepp.tcl create mode 100644 lib/maracasVisuLib/src/interface/tcl/tkwidgets/mclistbox.tcl create mode 100644 lib/maracasVisuLib/src/interface/tcl/to_change/Makefile.am create mode 100644 lib/maracasVisuLib/src/interface/tcl/to_change/Makefile.in create mode 100644 lib/maracasVisuLib/src/interface/tcl/to_change/TkImageViewerInteractor.tcl create mode 100644 lib/maracasVisuLib/src/interface/tcl/to_change/TkInteractor.tcl create mode 100644 lib/maracasVisuLib/src/interface/tcl/to_change/WidgetObject.tcl create mode 100644 lib/maracasVisuLib/src/interface/tcl/to_change/ev_userzoom.tcl create mode 100644 lib/maracasVisuLib/src/interface/tcl/to_change/volTkInteractor.tcl create mode 100644 lib/maracasVisuLib/src/interface/tcl/to_change/vtkInt.tcl create mode 100644 lib/maracasVisuLib/src/interface/tcl/windows/Makefile.am create mode 100644 lib/maracasVisuLib/src/interface/tcl/windows/Makefile.in create mode 100644 lib/maracasVisuLib/src/interface/tcl/windows/choose_direction.tcl create mode 100644 lib/maracasVisuLib/src/interface/tcl/windows/data_browser.tcl create mode 100644 lib/maracasVisuLib/src/interface/tcl/windows/dlg_name_axis.tcl create mode 100644 lib/maracasVisuLib/src/interface/tcl/windows/dlg_params.tcl create mode 100644 lib/maracasVisuLib/src/interface/tcl/windows/global_window.tcl create mode 100644 lib/maracasVisuLib/src/interface/tcl/windows/help_wnd.tcl create mode 100644 lib/maracasVisuLib/src/interface/tcl/windows/image_browser.tcl create mode 100644 lib/maracasVisuLib/src/interface/tcl/windows/planes_window.tcl create mode 100644 lib/maracasVisuLib/src/interface/tcl/windows/subtract.tcl create mode 100644 lib/maracasVisuLib/src/interface/tcl/windows/u_3D.tcl create mode 100644 lib/maracasVisuLib/src/interface/tcl/windows/u_mip.tcl create mode 100644 lib/maracasVisuLib/src/interface/tcl/windows/u_mpr.tcl create mode 100644 lib/maracasVisuLib/src/interface/tcl/windows/u_surf.tcl create mode 100644 lib/maracasVisuLib/src/interface/tcl/wrap_maracas.i create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/CMakeLists.txt create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/Contour/AutoControlPoints.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/Contour/AutoControlPoints.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/Contour/ContourCrownWidget.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/Contour/ContourCrownWidget.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/Contour/ContourExtractData.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/Contour/ContourExtractData.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/Contour/ContourPropagation.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/Contour/ContourPropagation.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/Contour/ContourVOIWidget.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/Contour/ContourVOIWidget.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/Contour/ExtractControlPoints2D.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/Contour/ExtractControlPoints2D.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/Contour/Propagation.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/Contour/Propagation.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/Contour/contoursIntersection.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/Contour/contoursIntersection.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/Contour/vectorFunctions.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/Contour/vectorFunctions.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/MaracasDll.cpp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/MaracasDll.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/StdAfx.cpp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/StdAfx.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/manualContour.cpp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/manualContour.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/manualContourContainer.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/manualContourContainer.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/marDict.txt create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/marDictionary.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/marDictionary.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/3D.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/3D.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/Axis_JF.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/Axis_JF.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/Axis_JF_MH1.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/Axis_JF_MH1.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/Axis_JF_MH2.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/Axis_JF_MH2.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/MPR.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/MPR.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/ProcessingCT.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/ProcessingCT.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/QuantificationCT.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/QuantificationCT.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/add.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/add.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/area.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/area.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/authors.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/authors.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/back.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/back.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/bright.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/bright.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/clear.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/clear.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/colours.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/colours.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/connect.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/connect.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/continue.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/continue.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/creatis_logo.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/creatis_logo.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/creatis_logo2.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/cross.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/cross.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/cutter.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/cutter.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/del_axis.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/del_axis.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/disable.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/disable.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/excel.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/excel.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/exit.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/exit.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/extract.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/extract.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/help.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/help.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/imagebrowser.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/imagebrowser.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/intensity.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/intensity.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/linear.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/linear.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/loadexp.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/loadexp.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/logo.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/logo.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/logocreatis.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/pan.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/pan.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/params.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/params.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/plans.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/plans.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/quant.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/quant.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/redblue.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/redblue.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/redgreen.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/redgreen.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/rotate.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/rotate.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/save.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/save.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/stl.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/stl.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/subtract.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/subtract.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/tick.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/tick.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/vessels.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/vessels.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/wizard.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/wizard.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/zoom.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps/zoom.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/maracas_01.xcf create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/maracas_02.xcf create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_bl_CTQuantification.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_bl_CTQuantification.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_bl_IRMQuantification.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_bl_IRMQuantification.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_bl_Information.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_bl_Information.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_bl_ListPatient_Voi.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_bl_ListPatient_Voi.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_bl_Logo.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_bl_Logo.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_bl_ManualRegistration.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_bl_ManualRegistration.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_bl_Params.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_bl_Params.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_bl_Processing.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_bl_Processing.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_bl_STLFormat.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_bl_STLFormat.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_bl_Tests.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_bl_Tests.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_bl_VascularTree.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_bl_VascularTree.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_mask.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_mask.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_re_CTQuantification.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_re_CTQuantification.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_re_IRMQuantification.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_re_IRMQuantification.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_re_ListPatient_Voi.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_re_ListPatient_Voi.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_re_Logo.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_re_Logo.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_re_ManualRegistration.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_re_ManualRegistration.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_re_Params.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_re_Params.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_re_Processing.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_re_Processing.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_re_STLFormat.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_re_STLFormat.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_re_Tests.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_re_Tests.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_re_VascularTree.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_bi_re_VascularTree.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_bl_AddAllPatients.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_bl_AddAllPatients.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_bl_AddPatient.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_bl_AddPatient.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_bl_AxisExtraction.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_bl_AxisExtraction.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_bl_CreateDICOMDIR.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_bl_CreateDICOMDIR.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_bl_ListPatient.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_bl_ListPatient.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_bl_MPR.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_bl_MPR.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_bl_OpenDICOMDIR.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_bl_OpenDICOMDIR.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_bl_OpenDirectory.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_bl_OpenDirectory.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_bl_Processing.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_bl_Processing.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_bl_ProcessingCT.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_bl_ProcessingCT.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_bl_Quantification.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_bl_Quantification.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_bl_STLFormat.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_bl_STLFormat.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_bl_TreeExtraction_JF_MH.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_bl_TreeExtraction_JF_MH.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_bl_voi.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_bl_voi.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_mask.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_mask.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_re_ListPatient.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_re_ListPatient.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_re_voi.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_re_voi.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_tr_MPR.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_tr_MPR.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_tr_Processing.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_tr_Processing.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_tr_Quantification.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_tr_Quantification.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_tr_STLFormat.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_tr_STLFormat.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_tr_VOI.bmp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/bitmaps2/v2_sm_tr_VOI.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/dialogs/marDiagParameters.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/dialogs/marDiagParameters.wxr create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/dialogs/ressource.wxg create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/icons/maracas.ico create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/icons/maracas.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/res/wxInterface.rc create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/tools/CMakeLists.txt create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/tools/MaracasTools.cpp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/tools/MaracasTools.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/ContourView.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/ContourView.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/InterfaceVtkPanelWidgets.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/InterfaceVtkPanelWidgets.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/LineView.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/LineView.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/PointView.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/PointView.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/README create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/UtilVtk3DGeometriSelection.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/UtilVtk3DGeometriSelection.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/chart.cpp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/chart.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/Histogram.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/Histogram.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/HistogramDialog.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/HistogramDialog.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/HistogramWidget.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/HistogramWidget.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/LogicalColorBar.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/LogicalColorBar.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/MaximumsDialog.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/MaximumsDialog.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/mBarRange.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/mBarRange.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/mathplot.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/mathplot.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pColorBar.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pColorBar.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pColorPoint.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pColorPoint.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pFigure.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pFigure.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pFunctionPoint.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pFunctionPoint.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pGraphicalFunction.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pGraphicalFunction.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pHistogram.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pHistogram.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pLogicalFunction.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pLogicalFunction.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pPlotter.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pPlotter.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pPlotterLayer.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pPlotterLayer.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pPlotterScaleX.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pPlotterScaleX.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pPlotterScaleY.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pPlotterScaleY.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pPlotterWindow.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pPlotterWindow.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/res/area.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/res/bright.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/res/cine_loop.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/res/clear.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/res/intensity.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/res/linear.xpm create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk2DQuantSliceWidget.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk2DQuantSliceWidget.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk3DQuantSurfaceWidget.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk3DQuantSurfaceWidget.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk3DSurfaceSTLWidget.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk3DSurfaceSTLWidget.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk3DSurfaceWidget.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/vtk3DSurfaceWidget.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkClosePolyData.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkClosePolyData.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkImagePolyDataSeedConnectivity.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkImagePolyDataSeedConnectivity.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleCutter.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleCutter.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxChart.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxChart.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxEmptyPanelWidget.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxEmptyPanelWidget.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxEmptyPanelWidget_2.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxEmptyPanelWidget_2.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxEmptyPanel_3_Widget.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxEmptyPanel_3_Widget.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxImageBrowserWdg.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxImageBrowserWdg.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxImageViewerWidget.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxImageViewerWidget.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRBaseData.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRBaseData.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxManualRegistration3D.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxManualRegistration3D.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxManualSegmentation_MPRWidget.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxManualSegmentation_MPRWidget.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxManualTree_MPRWidget.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxManualTree_MPRWidget.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxParametersDialog.cpp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxParametersDialog.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxPathologyWidget_01.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxPathologyWidget_01.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxProcessingCTWidget.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxProcessingCTWidget.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxQuantificationWidget.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxQuantificationWidget.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxQuantificationWidgetCT.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxQuantificationWidgetCT.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxQuantificationWidget_base.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxQuantificationWidget_base.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxReadingPriorityPanel.cpp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxReadingPriorityPanel.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSTLWidget_02.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSTLWidget_02.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSTLWidget_03.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSTLWidget_03.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSegmentationFM3DWidget.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSegmentationFM3DWidget.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSurfaceMPR.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSurfaceMPR.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSurfaceSTLWidget.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSurfaceSTLWidget.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSurfaceWidget.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSurfaceWidget.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVTKRenderWindowInteractor.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVTKRenderWindowInteractor.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVTKRenderWindowInteractorEditContour.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVTKRenderWindowInteractorEditContour.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxILPDwithImage.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxILPDwithImage.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracas3DBrowser.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracas3DBrowser.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracasApp.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracasApp.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracasApp02.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracasApp02.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracasDataBrowser.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracasDataBrowser.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracasEmptyPanel.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracasEmptyPanel.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracasEmptyPanel_2.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracasEmptyPanel_2.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracasEmptyPanel_3.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracasEmptyPanel_3.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracasFrame.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracasFrame.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracasFrame02.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracasFrame02.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracasHelpDialog.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracasHelpDialog.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracasImageBrowser.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracasImageBrowser.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracasImageBrowser02.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracasImageBrowser02.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracasMPR.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracasMPR.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracasParametersDialog.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracasParametersDialog.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracasPathology_01.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracasPathology_01.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracasProcessingCT.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracasProcessingCT.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracasQuantification.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracasQuantification.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracasQuantificationCT.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracasQuantificationCT.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualContour_Panel.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualContour_Panel.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualSegmentation_MPR.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualSegmentation_MPR.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualTree_MPR.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualTree_MPR.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualTree_MPRDlg.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_ManualTree_MPRDlg.h create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_SegmentationFM3D.cxx create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/wxMaracas_SegmentationFM3D.h create mode 100644 lib/maracasVisuLib/src/kernel/CMakeLists.txt create mode 100644 lib/maracasVisuLib/src/kernel/README create mode 100644 lib/maracasVisuLib/src/kernel/axisExtractor.cxx create mode 100644 lib/maracasVisuLib/src/kernel/axisExtractor.h create mode 100644 lib/maracasVisuLib/src/kernel/axisExtractor02.cxx create mode 100644 lib/maracasVisuLib/src/kernel/axisExtractor02.h create mode 100644 lib/maracasVisuLib/src/kernel/carotidaBifurcacion.cxx create mode 100644 lib/maracasVisuLib/src/kernel/carotidaBifurcacion.h create mode 100644 lib/maracasVisuLib/src/kernel/curve.cxx create mode 100644 lib/maracasVisuLib/src/kernel/curve.hxx create mode 100644 lib/maracasVisuLib/src/kernel/gslobj.hxx create mode 100644 lib/maracasVisuLib/src/kernel/itkFM3D.cxx create mode 100644 lib/maracasVisuLib/src/kernel/itkFM3D.h create mode 100644 lib/maracasVisuLib/src/kernel/itkImageToVTKImageFilter.h create mode 100644 lib/maracasVisuLib/src/kernel/itkImageToVTKImageFilter.txx create mode 100644 lib/maracasVisuLib/src/kernel/itkVTKImageToImageFilter.h create mode 100644 lib/maracasVisuLib/src/kernel/itkVTKImageToImageFilter.txx create mode 100644 lib/maracasVisuLib/src/kernel/marAxis.cpp create mode 100644 lib/maracasVisuLib/src/kernel/marAxis.h create mode 100644 lib/maracasVisuLib/src/kernel/marAxisCT.cpp create mode 100644 lib/maracasVisuLib/src/kernel/marAxisCT.h create mode 100644 lib/maracasVisuLib/src/kernel/marAxisContours.cpp create mode 100644 lib/maracasVisuLib/src/kernel/marAxisContours.h create mode 100644 lib/maracasVisuLib/src/kernel/marContour.cpp create mode 100644 lib/maracasVisuLib/src/kernel/marContour.h create mode 100644 lib/maracasVisuLib/src/kernel/marContourVO.cpp create mode 100644 lib/maracasVisuLib/src/kernel/marContourVO.h create mode 100644 lib/maracasVisuLib/src/kernel/marDicom.cpp create mode 100644 lib/maracasVisuLib/src/kernel/marDicom.h create mode 100644 lib/maracasVisuLib/src/kernel/marDicomBase.cpp create mode 100644 lib/maracasVisuLib/src/kernel/marDicomBase.h create mode 100644 lib/maracasVisuLib/src/kernel/marDynData.cpp create mode 100644 lib/maracasVisuLib/src/kernel/marDynData.h create mode 100644 lib/maracasVisuLib/src/kernel/marExperiment.cpp create mode 100644 lib/maracasVisuLib/src/kernel/marExperiment.h create mode 100644 lib/maracasVisuLib/src/kernel/marExperimentCT.cpp create mode 100644 lib/maracasVisuLib/src/kernel/marExperimentCT.h create mode 100644 lib/maracasVisuLib/src/kernel/marGdcmDicom.cpp create mode 100644 lib/maracasVisuLib/src/kernel/marGdcmDicom.h create mode 100644 lib/maracasVisuLib/src/kernel/marImageData.cpp create mode 100644 lib/maracasVisuLib/src/kernel/marImageData.h create mode 100644 lib/maracasVisuLib/src/kernel/marInterface.cpp create mode 100644 lib/maracasVisuLib/src/kernel/marInterface.h create mode 100644 lib/maracasVisuLib/src/kernel/marInterfaceCT.cpp create mode 100644 lib/maracasVisuLib/src/kernel/marInterfaceCT.h create mode 100644 lib/maracasVisuLib/src/kernel/marIsocontour.cpp create mode 100644 lib/maracasVisuLib/src/kernel/marIsocontour.h create mode 100644 lib/maracasVisuLib/src/kernel/marKVolume.cpp create mode 100644 lib/maracasVisuLib/src/kernel/marKVolume.h create mode 100644 lib/maracasVisuLib/src/kernel/marLine.cpp create mode 100644 lib/maracasVisuLib/src/kernel/marLine.h create mode 100644 lib/maracasVisuLib/src/kernel/marMathConst.h create mode 100644 lib/maracasVisuLib/src/kernel/marMatrix.cpp create mode 100644 lib/maracasVisuLib/src/kernel/marMatrix.h create mode 100644 lib/maracasVisuLib/src/kernel/marObject.cpp create mode 100644 lib/maracasVisuLib/src/kernel/marObject.h create mode 100644 lib/maracasVisuLib/src/kernel/marParameters.cpp create mode 100644 lib/maracasVisuLib/src/kernel/marParameters.h create mode 100644 lib/maracasVisuLib/src/kernel/marPoint.cpp create mode 100644 lib/maracasVisuLib/src/kernel/marPoint.h create mode 100644 lib/maracasVisuLib/src/kernel/marSimpleDicom.cpp create mode 100644 lib/maracasVisuLib/src/kernel/marSimpleDicom.h create mode 100644 lib/maracasVisuLib/src/kernel/marTypes.h create mode 100644 lib/maracasVisuLib/src/kernel/marUtils.cpp create mode 100644 lib/maracasVisuLib/src/kernel/marUtils.h create mode 100644 lib/maracasVisuLib/src/kernel/marVector.cpp create mode 100644 lib/maracasVisuLib/src/kernel/marVector.h create mode 100644 lib/maracasVisuLib/src/kernel/matrix.cxx create mode 100644 lib/maracasVisuLib/src/kernel/vector.cxx create mode 100644 lib/maracasVisuLib/src/kernel/volume.cxx create mode 100644 lib/maracasVisuLib/src/kernel/volume.hxx create mode 100644 lib/maracasVisuLib/src/kernel/vtkDijkstraImageData.cxx create mode 100644 lib/maracasVisuLib/src/kernel/vtkDijkstraImageData.h create mode 100644 lib/maracasVisuLib/src/kernel/vtkJoiner.cxx create mode 100644 lib/maracasVisuLib/src/kernel/vtkJoiner.h create mode 100644 lib/maracasVisuLib/src/kernel/vtkOtsu.cxx create mode 100644 lib/maracasVisuLib/src/kernel/vtkOtsu.h create mode 100644 lib/maracasVisuLib/src/kernel/vtkOtsuImageData.cxx create mode 100644 lib/maracasVisuLib/src/kernel/vtkOtsuImageData.h create mode 100644 lib/maracasVisuLib/src/kernel/vtkOtsuSphereSource.cxx create mode 100644 lib/maracasVisuLib/src/kernel/vtkOtsuSphereSource.h create mode 100644 lib/maracasVisuLib/src/kernel/vtkSTLExtractor.cpp create mode 100644 lib/maracasVisuLib/src/kernel/vtkSTLExtractor.h diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..f4f1ace --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,34 @@ +PROJECT(creaMaracasVisu) + +SET(PROJECT_MAJOR_VERSION 1) +SET(PROJECT_MINOR_VERSION 0) +SET(PROJECT_BUILD_VERSION 0) + +SET(CREA_VERBOSE_CMAKE TRUE) + +FIND_PACKAGE(crea REQUIRED) +IF (crea_FOUND) + INCLUDE(${crea_USE_FILE}) +ENDIF(crea_FOUND) +CREA_PREVENT_IN_SOURCE_BUILD() + +SET(USE_GDCM ON) +SET(USE_GDCM_VTK ON) +SET(USE_WXWIDGETS ON) +SET(USE_VTK ON) +SET(USE_ITK ON) +SET(USE_BOOST OFF) + +CREA_FIND_AND_USE_LIBRARIES() + +SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}) +SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}) +MARK_AS_ADVANCED( + CMAKE_BACKWARDS_COMPATIBILITY + EXECUTABLE_OUTPUT_PATH + LIBRARY_OUTPUT_PATH + ) + +#SUBDIRS(appli) +#SUBDIRS(lib) +SUBDIRS(lib) diff --git a/appli/template_appli/CMakeLists.txt b/appli/template_appli/CMakeLists.txt new file mode 100644 index 0000000..3b02804 --- /dev/null +++ b/appli/template_appli/CMakeLists.txt @@ -0,0 +1,33 @@ +#---------------------------------------------------------------------------- +# SET THE NAME OF YOUR EXECUTABLE +SET ( EXE_NAME MyExe ) +#---------------------------------------------------------------------------- + +#---------------------------------------------------------------------------- +# EXECUTABLE SOURCES (TO BE COMPILED) +# EITHER LIST ALL .cxx, *.cpp, *.cc IN CURRENT DIR USING NEXT LINE: +FILE(GLOB ${EXE_NAME}_SOURCES *.cxx *.cpp *.cc) +# OR MANUALLY LIST YOUR FILES WITH NEXT COMMAND (WITHOUT EXTENSION) +# SET ( ${EXE_NAME}_SOURCES +# +# ) +#---------------------------------------------------------------------------- + +#---------------------------------------------------------------------------- +# DEPENDENCIES (LIBRARIES TO LINK WITH) +SET ( ${EXE_NAME}_LINK_LIBRARIES + ${crea_LIBRARIES} + # ${WXWIDGETS_LIBRARIES} + # ${VTK_LIBRARIES} + # ${ITK_LIBRARIES} + # ${GDCM_LIBRARIES} + # ${BOOST_LIBRARIES} + ) +#---------------------------------------------------------------------------- + +#---------------------------------------------------------------------------- +# CREATES AND INSTALLS THE EXE +CREA_ADD_EXECUTABLE( ${EXE_NAME} ) +#---------------------------------------------------------------------------- + + diff --git a/appli/template_wx_appli/CMakeLists.txt b/appli/template_wx_appli/CMakeLists.txt new file mode 100644 index 0000000..fd728c2 --- /dev/null +++ b/appli/template_wx_appli/CMakeLists.txt @@ -0,0 +1,40 @@ +#---------------------------------------------------------------------------- +# SET THE NAME OF YOUR EXECUTABLE +SET ( EXE_NAME MyExe ) +#---------------------------------------------------------------------------- + +#---------------------------------------------------------------------------- +# EXECUTABLE SOURCES (TO BE COMPILED) +# EITHER LIST ALL .cxx, *.cpp, *.cc IN CURRENT DIR USING NEXT LINE: +FILE(GLOB ${EXE_NAME}_SOURCES *.cxx *.cpp *.cc) +# OR MANUALLY LIST YOUR FILES WITH NEXT COMMAND (WITHOUT EXTENSION) +# SET ( ${EXE_NAME}_SOURCES +# +# ) +#---------------------------------------------------------------------------- + +#---------------------------------------------------------------------------- +# DEPENDENCIES (LIBRARIES TO LINK WITH) +SET ( ${EXE_NAME}_LINK_LIBRARIES + ${crea_LIBRARIES} + # ${WXWIDGETS_LIBRARIES} + # ${VTK_LIBRARIES} + # ${ITK_LIBRARIES} + # ${GDCM_LIBRARIES} + # ${BOOST_LIBRARIES} + ) +#---------------------------------------------------------------------------- + +#---------------------------------------------------------------------------- +# UNCOMMENT NEXT LINE IF YOU WANT A CONSOLE ON WINDOWS +# NB : YOUR MAIN MUST BE ADAPTED ALSO +# SEE THE MACRO CREA_WXMAIN_WITH_CONSOLE IN creaWx.h +#SET(${EXE_NAME}_CONSOLE TRUE) +#---------------------------------------------------------------------------- + +#---------------------------------------------------------------------------- +# CREATES AND INSTALLS THE EXE +CREA_ADD_WX_EXECUTABLE( ${EXE_NAME} ) +#---------------------------------------------------------------------------- + + diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt new file mode 100644 index 0000000..0aca18d --- /dev/null +++ b/lib/CMakeLists.txt @@ -0,0 +1,2 @@ +# Add a SUBDIRS command for each of your libraries +SUBDIRS(maracasVisuLib) diff --git a/lib/maracasVisuLib/CMakeLists.txt b/lib/maracasVisuLib/CMakeLists.txt new file mode 100644 index 0000000..c9ea732 --- /dev/null +++ b/lib/maracasVisuLib/CMakeLists.txt @@ -0,0 +1,276 @@ +#---------------------------------------------------------------------------- +# SET THE NAME OF YOUR LIBRARY +SET ( LIBRARY_NAME maracasVisuLib ) +#---------------------------------------------------------------------------- + +#---------------------------------------------------------------------------- +# CREATES A USER OPTION IN CMAKE +OPTION ( BUILD_${LIBRARY_NAME} "Build ${LIBRARY_NAME} library ?" ON) + +#OPTION ( EXPORTS_MaracasKernel "Build ${LIBRARY_NAME} library ?" ON) +#IF (EXPORTS_MaracasKernel) +# SET(MaracasKernel_EXPORTS) +# ADD_DEFINITIONS (-DMaracasKernel_EXPORTS) +#ENDIF(EXPORTS_MaracasKernel) + +#---------------------------------------------------------------------------- +IF ( BUILD_${LIBRARY_NAME} ) +#---------------------------------------------------------------------------- + + #---------------------------------------------------------------------------- + # BUILD LIBRARY + #---------------------------------------------------------------------------- +#jhcl-Start=========================================================================== + INCLUDE_DIRECTORIES( + include + src + #${MARACAS_SOURCE_DIR}/src/axe3DVTK + # ${MARACAS_SOURCE_DIR}/src/interface + src/kernel + #${MARACAS_SOURCE_DIR}/src/SnakeIsoContour+Deriche + src/interface/wxWindows + src/interface/wxWindows/widgets + src/interface/wxWindows/widgets/pPlotter + ../../../ +) + #message(jhcl\n\n ${crea_LIBRARIES}) + INCLUDE(include/Modules/MARACAS_Find_LIBIDO.cmake) + SET(CREA_LIBRARIES C:/creaBin/Debug/crea.lib) + FIND_PACKAGE(crea) +#jhcl-End=========================================================================== + #---------------------------------------------------------------------------- + # LIBRARY HEADERS (TO BE INSTALLED) + # EITHER LIST ALL .h IN CURRENT DIR USING NEXT LINE: + #FILE(GLOB ${LIBRARY_NAME}_HEADERS "*.h") + # OR MANUALLY LIST YOUR HEADERS WITH NEXT COMMAND + SET ( ${LIBRARY_NAME}_HEADERS + src/interface/wxWindows/manualContour.h + src/interface/wxWindows/Contour/ContourCrownWidget.h + src/interface/wxWindows/Contour/ContourVOIWidget.h + src/interface/wxWindows/Contour/Propagation.h + src/interface/wxWindows/Contour/ExtractControlPoints2D.h + src/interface/wxWindows/Contour/AutoControlPoints.h + src/interface/wxWindows/Contour/ContourPropagation.h + src/interface/wxWindows/Contour/contoursIntersection.h + src/interface/wxWindows/Contour/vectorFunctions.h + src/interface/wxWindows/wxMaracasImageBrowser02.h + src/interface/wxWindows/widgets/wxReadingPriorityPanel.h + src/interface/wxWindows/widgets/wxVTKRenderWindowInteractor.h + src/interface/wxWindows/widgets/InterfaceVtkPanelWidgets.h + src/interface/wxWindows/widgets/vtkClosePolyData.h + src/interface/wxWindows/wxMaracasMPR.h + src/interface/wxWindows/widgets/wxMPRWidget.h + src/interface/wxWindows/widgets/wxMPRBaseData.h + src/interface/wxWindows/widgets/wxVtkBaseView.h + src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.h + src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.h + src/interface/wxWindows/wxMaracas_ManualTree_MPR.h + src/interface/wxWindows/widgets/wxManualTree_MPRWidget.h + src/interface/wxWindows/widgets/ContourView.h + src/interface/wxWindows/widgets/PointView.h + src/interface/wxWindows/widgets/LineView.h + src/interface/wxWindows/widgets/UtilVtk3DGeometriSelection.h + src/interface/wxWindows/widgets/pPlotter/HistogramDialog.h + src/interface/wxWindows/widgets/pPlotter/HistogramWidget.h + src/interface/wxWindows/widgets/pPlotter/pHistogram.h + src/interface/wxWindows/widgets/pPlotter/mBarRange.h + src/interface/wxWindows/widgets/pPlotter/pLogicalFunction.h + src/interface/wxWindows/widgets/pPlotter/LogicalColorBar.h + src/interface/wxWindows/widgets/pPlotter/pGraphicalFunction.h + src/interface/wxWindows/widgets/pPlotter/pFunctionPoint.h + src/interface/wxWindows/widgets/pPlotter/pPlotterWindow.h + src/interface/wxWindows/widgets/pPlotter/pPlotterLayer.h + src/interface/wxWindows/widgets/pPlotter/pPlotterScaleX.h + src/interface/wxWindows/widgets/pPlotter/pPlotterScaleY.h + src/interface/wxWindows/widgets/pPlotter/pColorBar.h + src/interface/wxWindows/widgets/pPlotter/pFigure.h + src/interface/wxWindows/widgets/pPlotter/pColorPoint.h + src/interface/wxWindows/widgets/pPlotter/pPlotter.h + src/interface/wxWindows/widgets/pPlotter/mathplot.h + src/interface/wxWindows/widgets/pPlotter/MaximumsDialog.h + src/interface/wxWindows/widgets/pPlotter/Histogram.h + /../include/matrix.h + src/kernel/marImageData.h + src/kernel/marDicomBase.h + src/kernel/marGdcmDicom.h + src/kernel/marObject.h + src/kernel/volume.hxx + src/kernel/marTypes.h + src/kernel/marParameters.h + src/kernel/marDynData.h + ) + #---------------------------------------------------------------------------- + + #---------------------------------------------------------------------------- + # 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) + # OR MANUALLY LIST YOUR FILES WITH NEXT COMMAND (WITHOUT EXTENSION) + SET ( ${LIBRARY_NAME}_SOURCES + src/interface/wxWindows/manualContour.cpp + src/interface/wxWindows/Contour/ContourCrownWidget.cxx + src/interface/wxWindows/Contour/ContourExtractData.cxx + src/interface/wxWindows/Contour/ContourVOIWidget.cxx + src/interface/wxWindows/Contour/Propagation.cxx + src/interface/wxWindows/Contour/ExtractControlPoints2D.cxx + src/interface/wxWindows/Contour/AutoControlPoints.cxx + src/interface/wxWindows/Contour/ContourPropagation.cxx + src/interface/wxWindows/Contour/contoursIntersection.cxx + src/interface/wxWindows/Contour/vectorFunctions.cxx + src/interface/wxWindows/wxMaracasImageBrowser02.cxx + src/interface/wxWindows/widgets/wxReadingPriorityPanel.cpp + src/interface/wxWindows/widgets/wxVTKRenderWindowInteractor.cxx + src/interface/wxWindows/widgets/InterfaceVtkPanelWidgets.cxx + src/interface/wxWindows/widgets/vtkClosePolyData.cxx + src/interface/wxWindows/wxMaracasMPR.cxx + src/interface/wxWindows/widgets/wxMPRWidget.cxx + src/interface/wxWindows/widgets/wxMPRBaseData.cxx + src/interface/wxWindows/widgets/wxVtkBaseView.cxx + src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx + src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.cxx + src/interface/wxWindows/wxMaracas_ManualTree_MPR.cxx + src/interface/wxWindows/widgets/wxManualTree_MPRWidget.cxx + src/interface/wxWindows/res/wxInterface.rc + src/interface/wxWindows/widgets/ContourView.cxx + src/interface/wxWindows/widgets/PointView.cxx + src/interface/wxWindows/widgets/LineView.cxx + src/interface/wxWindows/widgets/UtilVtk3DGeometriSelection.cxx +#####pPlotter classes + src/interface/wxWindows/widgets/pPlotter/HistogramDialog.cxx + src/interface/wxWindows/widgets/pPlotter/HistogramWidget.cxx + src/interface/wxWindows/widgets/pPlotter/pHistogram.cxx + src/interface/wxWindows/widgets/pPlotter/mBarRange.cxx + src/interface/wxWindows/widgets/pPlotter/pLogicalFunction.cxx + src/interface/wxWindows/widgets/pPlotter/LogicalColorBar.cxx + src/interface/wxWindows/widgets/pPlotter/pGraphicalFunction.cxx + src/interface/wxWindows/widgets/pPlotter/pFunctionPoint.cxx + src/interface/wxWindows/widgets/pPlotter/pPlotterWindow.cxx + src/interface/wxWindows/widgets/pPlotter/pPlotterLayer.cxx + src/interface/wxWindows/widgets/pPlotter/pPlotterScaleX.cxx + src/interface/wxWindows/widgets/pPlotter/pPlotterScaleY.cxx + src/interface/wxWindows/widgets/pPlotter/pColorBar.cxx + src/interface/wxWindows/widgets/pPlotter/pFigure.cxx + src/interface/wxWindows/widgets/pPlotter/pColorPoint.cxx + src/interface/wxWindows/widgets/pPlotter/pPlotter.cxx + src/interface/wxWindows/widgets/pPlotter/mathplot.cxx + src/interface/wxWindows/widgets/pPlotter/MaximumsDialog.cxx + src/interface/wxWindows/widgets/pPlotter/Histogram.cxx +### + src/kernel/marImageData.cpp + src/kernel/marDicomBase.cpp + src/kernel/marGdcmDicom.cpp + src/kernel/marObject.cpp + src/kernel/volume.cxx + src/kernel/marParameters.cpp + src/kernel/marDynData.cpp + ) + #---------------------------------------------------------------------------- +#jhcl-Start=========================================================================== +#message(jhcl4${LIBIDO_LIBRARIES}) +#jhcl-End=========================================================================== + + #---------------------------------------------------------------------------- + # LIBRARY DEPENDENCIES (LIBRARIES TO LINK WITH) + SET ( ${LIBRARY_NAME}_LINK_LIBRARIES + ${crea_LIBRARIES} + ${WXWIDGETS_LIBRARIES} + ${VTK_LIBRARIES} + ${ITK_LIBRARIES} + ${GDCM_LIBRARIES} + # ${BOOST_LIBRARIES} + #jhcl-Start=========================================================================== + + ${LIBIDO_LIBRARIES} + ${CREA_LIBRARIES} + #${BOOST_LIBRARIES} + #jhcl-End=========================================================================== + ) + #---------------------------------------------------------------------------- + + + #---------------------------------------------------------------------------- + # MACRO WHICH DOES ALL THE JOB : BUILD AND INSTALL +#JHCL + #CREA_ADD_LIBRARY( ${LIBRARY_NAME} ) +#JHCL + +# Ya esta hecho arriba +# SET(LIBRARY_NAME ******NOMBRE*******) + + IF(CREA_VERBOSE_CMAKE) + MESSAGE(STATUS "** Creating library ${LIBRARY_NAME}") + MESSAGE(STATUS " Headers : ${${LIBRARY_NAME}_HEADERS}") + MESSAGE(STATUS " Sources : ${${LIBRARY_NAME}_SOURCES}") + MESSAGE(STATUS " Link libs: ${${LIBRARY_NAME}_LINK_LIBRARIES}") + ENDIF(CREA_VERBOSE_CMAKE) + + + # MANAGE SHARED LIB + CREA_MANAGE_SHARED_LIBRARY(${LIBRARY_NAME}) + + # CREATE THE TARGET + ADD_LIBRARY(${LIBRARY_NAME} ${${LIBRARY_NAME}_SHARED} ${${LIBRARY_NAME}_SOURCES}) + + # LINK + TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${${LIBRARY_NAME}_LINK_LIBRARIES}) + + # Sets the settings for macro CREA_ADVANCED_INSTALL_LIBRARY_FOR_CMAKE + SET(${LIBRARY_NAME}_INSTALL_FOLDER ${LIBRARY_NAME}) + SET(${LIBRARY_NAME}_LIBRARIES ${LIBRARY_NAME}) + +# FILE(RELATIVE_PATH + # ${LIBRARY_NAME}_BUILD_TREE_RELATIVE_INCLUDE_PATHS + # ${PROJECT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} + # ) + +SET(${LIBRARY_NAME}_BUILD_TREE_RELATIVE_INCLUDE_PATHS +#lib/THIS_DIR/toto +#lib/THIS_DIR/other_headers + lib/maracasVisuLib/src + #${MARACAS_SOURCE_DIR}/src/axe3DVTK + # ${MARACAS_SOURCE_DIR}/src/interface + lib/maracasVisuLib/src/kernel + #${MARACAS_SOURCE_DIR}/src/SnakeIsoContour+Deriche + lib/maracasVisuLib/src/interface/wxWindows + lib/maracasVisuLib/src/interface/wxWindows/widgets + lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter + lib/maracasVisuLib/../../../ +) + +IF(UNIX) + SET(${LIBRARY_NAME}_BUILD_TREE_RELATIVE_LIBRARY_PATHS + ${EXECUTABLE_OUTPUT_REL_PATH}) + SET(${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_LIBRARY_PATHS lib) +ELSE(UNIX) + SET(${LIBRARY_NAME}_BUILD_TREE_RELATIVE_LIBRARY_PATHS + ${EXECUTABLE_OUTPUT_REL_PATH}/Debug + ${EXECUTABLE_OUTPUT_REL_PATH}/Release) + SET(${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_LIBRARY_PATHS bin) +ENDIF(UNIX) + SET(${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_INCLUDE_PATHS include/${LIBRARY_NAME}) + SET(${LIBRARY_NAME}_HAS_ADDITIONAL_CONFIG_FILE FALSE) +# SET(${LIBRARY_NAME}_ADDITIONAL_CONFIG_FILE +# ${PROJECT_SOURCE_DIR}/src/AdditionalcreaImageIOConfig.cmake.in) +# SET(${LIBRARY_NAME}_ADDITIONAL_USE_FILE +# ${PROJECT_SOURCE_DIR}/src/AdditionalUsecreaImageIO.cmake.in) + +# Invoke the advanced macro +CREA_ADVANCED_INSTALL_LIBRARY_FOR_CMAKE(${LIBRARY_NAME}) + +# INSTALLS LIBRARY +INSTALL( + FILES ${${LIBRARY_NAME}_HEADERS} + DESTINATION ${${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_INCLUDE_PATHS} + ) +INSTALL( + TARGETS ${LIBRARY_NAME} + DESTINATION lib) + + + + + #---------------------------------------------------------------------------- + + + #--------------------------------------------------------------------------- +ENDIF ( BUILD_${LIBRARY_NAME} ) diff --git a/lib/maracasVisuLib/include/Maracas.iss b/lib/maracasVisuLib/include/Maracas.iss new file mode 100644 index 0000000..ff1e12e --- /dev/null +++ b/lib/maracasVisuLib/include/Maracas.iss @@ -0,0 +1,48 @@ +; Script generated by the Inno Setup Script Wizard. +; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! + +[Setup] +AppName=Maracas +AppVerName=Maracas 2.0 +AppPublisher=CREATIS +AppPublisherURL=http://www.creatis.insa-lyon.fr/maracas +AppSupportURL=http://www.creatis.insa-lyon.fr/maracas +AppUpdatesURL=http://www.creatis.insa-lyon.fr/maracas +DefaultDirName={pf}\Maracas +DefaultGroupName=Maracas +AllowNoIcons=yes + +[Tasks] +; NOTE: The following entry contains English phrases ("Create a desktop icon" and "Additional icons"). You are free to translate them into another language if required. +Name: "desktopicon"; Description: "Create a &desktop icon"; GroupDescription: "Additional icons:" +; NOTE: The following entry contains English phrases ("Create a Quick Launch icon" and "Additional icons"). You are free to translate them into another language if required. +Name: "quicklaunchicon"; Description: "Create a &Quick Launch icon"; GroupDescription: "Additional icons:"; Flags: unchecked + +[Files] +Source: "C:\Mathieu\Maracas\bin\Release\maracas.exe"; DestDir: "{app}"; Flags: ignoreversion +Source: "C:\Mathieu\Maracas\bin\Release\gsl.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "C:\Mathieu\Maracas\bin\Release\gslcblas.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "C:\Mathieu\Maracas\bin\Release\idodllvc.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "C:\Mathieu\Maracas\bin\Release\glib-1.3.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "C:\Mathieu\gdcm\Dicts\dicomV3.dic"; DestDir: "{app}"; Flags: ignoreversion +; NOTE: Don't use "Flags: ignoreversion" on any shared system files + +[INI] +Filename: "{app}\maracas.url"; Section: "InternetShortcut"; Key: "URL"; String: "http://www.creatis.insa-lyon.fr/maracas" + +[Icons] +Name: "{group}\Maracas"; Filename: "{app}\maracas.exe" +; NOTE: The following entry contains an English phrase ("on the Web"). You are free to translate it into another language if required. +Name: "{group}\Maracas on the Web"; Filename: "{app}\maracas.url" +; NOTE: The following entry contains an English phrase ("Uninstall"). You are free to translate it into another language if required. +Name: "{group}\Uninstall Maracas"; Filename: "{uninstallexe}" +Name: "{userdesktop}\Maracas"; Filename: "{app}\maracas.exe"; Tasks: desktopicon +Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\Maracas"; Filename: "{app}\maracas.exe"; Tasks: quicklaunchicon + +[Run] +; NOTE: The following entry contains an English phrase ("Launch"). You are free to translate it into another language if required. +Filename: "{app}\maracas.exe"; Description: "Launch Maracas"; Flags: nowait postinstall skipifsilent + +[UninstallDelete] +Type: files; Name: "{app}\maracas.url" + diff --git a/lib/maracasVisuLib/include/Modules/FindCrea.cmake b/lib/maracasVisuLib/include/Modules/FindCrea.cmake new file mode 100644 index 0000000..5782e21 --- /dev/null +++ b/lib/maracasVisuLib/include/Modules/FindCrea.cmake @@ -0,0 +1,3 @@ +FIND_PATH( crea_DIR creabin $ENV{CREA_PATH} ) +FIND_PACKAGE(crea) +INCLUDE_DIRECTORIES(${CREA_INCLUDE_PATH}) \ No newline at end of file diff --git a/lib/maracasVisuLib/include/Modules/FindGDCM.cmake b/lib/maracasVisuLib/include/Modules/FindGDCM.cmake new file mode 100644 index 0000000..4920ff7 --- /dev/null +++ b/lib/maracasVisuLib/include/Modules/FindGDCM.cmake @@ -0,0 +1,104 @@ +# - Find a GDCM installation or build tree. +# The following variables are set if GDCM is found. If GDCM is not +# found, GDCM_FOUND is set to false. +# GDCM_FOUND - Set to true when GDCM is found. +# GDCM_USE_FILE - CMake file to use GDCM. +# GDCM_MAJOR_VERSION - The GDCM major version number. +# GDCM_MINOR_VERSION - The GDCM minor version number +# (odd non-release). +# GDCM_BUILD_VERSION - The GDCM patch level +# (meaningless for odd minor). +# GDCM_INCLUDE_DIRS - Include directories for GDCM +# GDCM_LIBRARY_DIRS - Link directories for GDCM libraries +# GDCM_KITS - List of GDCM kits, in CAPS +# (COMMON,IO,) etc. +# GDCM_LANGUAGES - List of wrapped languages, in CAPS +# (TCL, PYHTON,) etc. +# The following cache entries must be set by the user to locate GDCM: +# GDCM_DIR - The directory containing GDCMConfig.cmake. +# This is either the root of the build tree, +# or the lib/vtk directory. This is the +# only cache entry. + + +# Construct consitent error messages for use below. +SET(GDCM_DIR_DESCRIPTION "directory containing GDCMConfig.cmake. This is either the root of the build tree, or PREFIX/lib/GDCM for an installation.") +SET(GDCM_DIR_MESSAGE "GDCM not found. Set the GDCM_DIR cmake cache entry to the ${GDCM_DIR_DESCRIPTION}") + +# Search only if the location is not already known. +IF(NOT GDCM_DIR) + # Get the system search path as a list. + IF(UNIX) + STRING(REGEX MATCHALL "[^:]+" GDCM_DIR_SEARCH1 "$ENV{PATH}") + ELSE(UNIX) + STRING(REGEX REPLACE "\\\\" "/" GDCM_DIR_SEARCH1 "$ENV{PATH}") + ENDIF(UNIX) + STRING(REGEX REPLACE "/;" ";" GDCM_DIR_SEARCH2 "${GDCM_DIR_SEARCH1}") + + # Construct a set of paths relative to the system search path. + SET(GDCM_DIR_SEARCH "") + FOREACH(dir ${GDCM_DIR_SEARCH2}) + SET(GDCM_DIR_SEARCH ${GDCM_DIR_SEARCH} + ${dir}/../lib/GDCM + ) + ENDFOREACH(dir) + + # + # Look for an installation or build tree. + # + FIND_PATH(GDCM_DIR GDCMConfig.cmake + # Look for an environment variable GDCM_DIR. + $ENV{GDCM_DIR} + + # Look in places relative to the system executable search path. + ${GDCM_DIR_SEARCH} + + # Look in standard UNIX install locations. + /usr/local/lib/GDCM + /usr/lib/GDCM + + # Read from the CMakeSetup registry entries. It is likely that + # GDCM will have been recently built. + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild1] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild2] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild3] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild4] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild5] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild6] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild7] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild8] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild9] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild10] + + # Help the user find it if we cannot. + DOC "The ${GDCM_DIR_DESCRIPTION}" + ) +ENDIF(NOT GDCM_DIR) + +# If GDCM was found, load the configuration file to get the rest of the +# settings. +IF(GDCM_DIR) + # Make sure the GDCMConfig.cmake file exists in the directory provided. + IF(EXISTS ${GDCM_DIR}/GDCMConfig.cmake) + + # We found GDCM. Load the settings. + SET(GDCM_FOUND 1) + INCLUDE(${GDCM_DIR}/GDCMConfig.cmake) + + ENDIF(EXISTS ${GDCM_DIR}/GDCMConfig.cmake) +ELSE(GDCM_DIR) + # We did not find GDCM. + SET(GDCM_FOUND 0) +ENDIF(GDCM_DIR) + +#----------------------------------------------------------------------------- +IF(NOT GDCM_FOUND) + # GDCM not found, explain to the user how to specify its location. + IF(NOT GDCM_FIND_QUIETLY) + MESSAGE(FATAL_ERROR ${GDCM_DIR_MESSAGE}) + ELSE(NOT GDCM_FIND_QUIETLY) + IF(GDCM_FIND_REQUIRED) + MESSAGE(FATAL_ERROR ${GDCM_DIR_MESSAGE}) + ENDIF(GDCM_FIND_REQUIRED) + ENDIF(NOT GDCM_FIND_QUIETLY) +ENDIF(NOT GDCM_FOUND) diff --git a/lib/maracasVisuLib/include/Modules/FindGLIB.cmake b/lib/maracasVisuLib/include/Modules/FindGLIB.cmake new file mode 100644 index 0000000..392833c --- /dev/null +++ b/lib/maracasVisuLib/include/Modules/FindGLIB.cmake @@ -0,0 +1,57 @@ +# +# This module finds if GLIB is installed and determines where the +# include files and libraries are. It also determines what the name of +# the library is. This code sets the following variables: +# +# GLIB_FOUND = system has GLIB and it should be used +# GLIB_LIBRARIES = full path to the GLIB library and linker flags on unix +# CMAKE_GLIB_CXX_FLAGS = compiler flags for building GLIB +# GLIB_INCLUDE_DIR = include path of GLIB + +IF(WIN32) + IF(CYGWIN) + + FIND_PROGRAM(CMAKE_GLIB_CONFIG glib-config ../glib/bin ../../glib/bin) + SET(CMAKE_GLIB_CXX_FLAGS "`${CMAKE_GLIB_CONFIG} --cflags`") + SET(GLIB_LIBRARIES "`${CMAKE_GLIB_CONFIG} --libs`") + + ELSE(CYGWIN) + + SET (GLIB_POSSIBLE_PATHS + $ENV{GLIB}/src/glib + $ENV{CREATIS}/glib-1.3/src/glib + "C:/glib-1.3/src/glib" + ) + FIND_LIBRARY(GLIB_SHARED_LIBRARY + NAMES glib-1.3 + PATHS ${GLIB_POSSIBLE_PATHS} + ) + + FIND_PATH(GLIB_INCLUDE_DIR + glib.h + ${GLIB_POSSIBLE_PATHS} + ) + + ENDIF(CYGWIN) +ELSE(WIN32) + + FIND_PROGRAM(CMAKE_GLIB_CONFIG glib-config ../glib/bin ../../glib/bin) + SET(CMAKE_GLIB_CXX_FLAGS "`${CMAKE_GLIB_CONFIG} --cflags`") + SET(GLIB_LIBRARIES "`${CMAKE_GLIB_CONFIG} --libs`") + +ENDIF(WIN32) + +MARK_AS_ADVANCED( + GLIB_SHARED_LIBRARY + CMAKE_GLIB_CONFIG + CMAKE_GLIB_CXX_FLAGS + GLIB_INCLUDE_DIR +) + +IF(GLIB_LIBRARIES) + IF(GLIB_INCLUDE_DIR OR CMAKE_GLIB_CXX_FLAGS) + SET(CMAKE_GLIB_CAN_COMPILE 1) + SET(GLIB_FOUND 1) + ENDIF(GLIB_INCLUDE_DIR OR CMAKE_GLIB_CXX_FLAGS) +ENDIF(GLIB_LIBRARIES) + diff --git a/lib/maracasVisuLib/include/Modules/FindGSL.cmake b/lib/maracasVisuLib/include/Modules/FindGSL.cmake new file mode 100644 index 0000000..145ec92 --- /dev/null +++ b/lib/maracasVisuLib/include/Modules/FindGSL.cmake @@ -0,0 +1,85 @@ +# +# This module finds if GSL is installed and determines where the +# include files and libraries are. It also determines what the name of +# the library is. This code sets the following variables: +# +# GSL_FOUND = system has GSL and it should be used +# GSL_LIBRARIES = full path to the GSL library and linker flags on unix +# CMAKE_GSL_CXX_FLAGS = compiler flags for building GSL +# GSL_INCLUDE_DIR = include path of GSL + +IF(WIN32) + IF(CYGWIN) + + FIND_PROGRAM(CMAKE_GSL_CONFIG gsl-config ../GSL/bin ../../GSL/bin) + SET(CMAKE_GSL_CXX_FLAGS "`${CMAKE_GSL_CONFIG} --cflags`") + SET(GSL_LIBRARIES "`${CMAKE_GSL_CONFIG} --libs`") + + ELSE(CYGWIN) + + SET (GSL_POSSIBLE_LIB_PATHS + $ENV{GSL}/lib + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\GNU Scientific Library_is1;Inno Setup: App Path]/lib" + ) + + FIND_LIBRARY(GSL_STATIC_LIBRARY + NAMES gsl + PATHS ${GSL_POSSIBLE_LIB_PATHS} + ) + + FIND_LIBRARY(GSL_SHARED_LIBRARY + NAMES gsl + PATHS ${GSL_POSSIBLE_LIB_PATHS} + ) + + SET (GSL_POSSIBLE_INCLUDE_PATHS + $ENV{GSL}/include + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\GNU Scientific Library_is1;Inno Setup: App Path]/include" + ) + + FIND_PATH(GSL_INCLUDE_DIR + gsl/gsl_version.h + ${GSL_POSSIBLE_INCLUDE_PATHS} + ) + + IF(GSL_SHARED_LIBRARY) + OPTION(GSL_USE_SHARED_LIBS + "Use shared versions of GSL libraries" ON) + MARK_AS_ADVANCED(GSL_USE_SHARED_LIBS) + ENDIF(GSL_SHARED_LIBRARY) + + SET(CMAKE_GSL_LIBRARIES ${CMAKE_GSL_LIBRARIES}) # comctl32 ctl3d32 wsock32 rpcrt4) + + IF(GSL_USE_SHARED_LIBS) + SET(GSL_LIBRARIES ${GSL_SHARED_LIBRARY} ${CMAKE_GSL_LIBRARIES}) + ELSE(GSL_USE_SHARED_LIBS) + SET(GSL_LIBRARIES ${GSL_STATIC_LIBRARY} ${CMAKE_GSL_LIBRARIES}) + ENDIF(GSL_USE_SHARED_LIBS) + + MARK_AS_ADVANCED( + GSL_STATIC_LIBRARY + GSL_SHARED_LIBRARY + GSL_INCLUDE_DIR + ) + ENDIF(CYGWIN) +ELSE(WIN32) + + FIND_PROGRAM(CMAKE_GSL_CONFIG gsl-config ../GSL/bin ../../GSL/bin) + SET(CMAKE_GSL_CXX_FLAGS "`${CMAKE_GSL_CONFIG} --cflags`") + SET(GSL_LIBRARIES "`${CMAKE_GSL_CONFIG} --libs`") + +ENDIF(WIN32) + +MARK_AS_ADVANCED( + CMAKE_GSL_CONFIG + CMAKE_GSL_CXX_FLAGS + GSL_INCLUDE_DIR +) + +IF(GSL_LIBRARIES) + IF(GSL_INCLUDE_DIR OR CMAKE_GSL_CXX_FLAGS) + SET(CMAKE_GSL_CAN_COMPILE 1) + SET(GSL_FOUND 1) + ENDIF(GSL_INCLUDE_DIR OR CMAKE_GSL_CXX_FLAGS) +ENDIF(GSL_LIBRARIES) + diff --git a/lib/maracasVisuLib/include/Modules/FindGSLobj.cmake b/lib/maracasVisuLib/include/Modules/FindGSLobj.cmake new file mode 100644 index 0000000..a129ca9 --- /dev/null +++ b/lib/maracasVisuLib/include/Modules/FindGSLobj.cmake @@ -0,0 +1,62 @@ +# +# This module finds if GSLOBJ is installed and determines where the +# include files and libraries are. It also determines what the name of +# the library is. This code sets the following variables: +# +# GSLOBJ_FOUND = system has GSLOBJ and it should be used +# GSLOBJ_LIBRARIES = full path to the GSLOBJ library and linker flags on unix +# CMAKE_GSLOBJ_CXX_FLAGS = compiler flags for building GSLOBJ +# GSLOBJ_INCLUDE_DIR = include path of GSLOBJ + +IF(WIN32) +IF(NOT UNIX) + SET (GSLOBJ_POSSIBLE_LIB_PATHS + $ENV{GSLOBJ}/lib + $ENV{CREATIS}/gslobj/win32inst/lib + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\GSLobj_is1;Inno Setup: App Path]/lib" + ) + + FIND_LIBRARY(GSLOBJ_STATIC_LIBRARY + NAMES gslobj + PATHS ${GSLOBJ_POSSIBLE_LIB_PATHS} + ) + + SET (GSLOBJ_POSSIBLE_INCLUDE_PATHS + $ENV{GSLOBJ}/include + $ENV{CREATIS}/gslobj/win32inst/include + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\GSLobj_is1;Inno Setup: App Path]/include" + ) + + FIND_PATH(GSLOBJ_INCLUDE_DIR + gslobj/gslobj.hxx + ${GSLOBJ_POSSIBLE_INCLUDE_PATHS} + ) + + SET(GSLOBJ_LIBRARIES ${GSLOBJ_STATIC_LIBRARY} ${CMAKE_GSLOBJ_LIBRARIES}) + + MARK_AS_ADVANCED( + GSLOBJ_STATIC_LIBRARY + GSLOBJ_INCLUDE_DIR + ) +ENDIF(NOT UNIX) +ENDIF(WIN32) + +IF(UNIX) + + FIND_PROGRAM(CMAKE_GSLOBJ_CONFIG gslobj-config ../gslobj/bin ../../gslobj/bin) + SET(CMAKE_GSLOBJ_CXX_FLAGS "`${CMAKE_GSLOBJ_CONFIG} --cflags`") + SET(GSLOBJ_LIBRARIES "`${CMAKE_GSLOBJ_CONFIG} --libs`") + +ENDIF(UNIX) + +MARK_AS_ADVANCED( + CMAKE_GSLOBJ_CXX_FLAGS + GSLOBJ_INCLUDE_DIR +) + +IF(GSLOBJ_LIBRARIES) + IF(GSLOBJ_INCLUDE_DIR OR CMAKE_GSLOBJ_CXX_FLAGS) + SET(CMAKE_GSLOBJ_CAN_COMPILE 1) + SET(GSLOBJ_FOUND 1) + ENDIF(GSLOBJ_INCLUDE_DIR OR CMAKE_GSLOBJ_CXX_FLAGS) +ENDIF(GSLOBJ_LIBRARIES) diff --git a/lib/maracasVisuLib/include/Modules/FindGTK.cmake b/lib/maracasVisuLib/include/Modules/FindGTK.cmake new file mode 100644 index 0000000..334c138 --- /dev/null +++ b/lib/maracasVisuLib/include/Modules/FindGTK.cmake @@ -0,0 +1,97 @@ +# +# try to find GTK (and glib) and GTKGLArea +# + +# GTK_INCLUDE_DIR - Directories to include to use GTK +# GTK_LIBRARIES - Files to link against to use GTK +# GTK_VERSION_2 - Use this Version +# GTK_VERSION_1 - Use this Version +# GTK_FOUND - If false, don't try to use GTK + +OPTION(GTK_VERSION_1 "Use GTK version 1.x" 1) +OPTION(GTK_VERSION_2 "Use GTK version 2.x" 2) + +# Exclusion between the two version + +IF(GTK_VERSION_2) + SET(GTK_VERSION_1 0) +ENDIF(GTK_VERSION_2) + +IF(WIN32) + #win sucks ! + +ELSE(WIN32) + + #Find new pkg-config + #FIND_PACKAGE(PKG) #don't know how to register ! + FIND_PROGRAM(CMAKE_PKG_CONFIG pkg-config ../gtk2/bin ../../gtk2/bin) + + #if PKG is found + IF(CMAKE_PKG_CONFIG) + + SET(CMAKE_GTK1_CXX_FLAGS "`${CMAKE_PKG_CONFIG} --cflags gtk`") + SET(GTK1_LIBRARIES "`${CMAKE_PKG_CONFIG} --libs gtk`") + + SET(CMAKE_GTK2_CXX_FLAGS "`${CMAKE_PKG_CONFIG} --cflags gtk+-2.0`") + SET(GTK2_LIBRARIES "`${CMAKE_PKG_CONFIG} --libs gtk+-2.0`") + + ELSE(CMAKE_PKG_CONFIG) + #we were not able to find to, lets try with: + #old gtk-config + FIND_PROGRAM(CMAKE_GTK_CONFIG gtk-config ../gtk/bin ../../gtk/bin) + + SET(CMAKE_GTK1_CXX_FLAGS "`${CMAKE_GTK_CONFIG} --cflags`") + SET(GTK1_LIBRARIES "`${CMAKE_GTK_CONFIG} --libs`") + + MESSAGE(FATAL_ERROR "GTK2.x was not found but GTK1.x was, please set GTK_VERSION_1 + to ON") + ENDIF(CMAKE_PKG_CONFIG) + +ENDIF(WIN32) + +MARK_AS_ADVANCED( + CMAKE_GTK_CXX_FLAGS + CMAKE_GTK2_CXX_FLAGS + GTK_INCLUDE_DIR +) + +#IF(GTK_LIBRARIES OR GTK2_LIBRARIES) + #only one gtk version was found ! + #default GTK to this one (even if it GTK2) +# OPTION() +#ENDIF(GTK_LIBRARIES OR GTK2_LIBRARIES) + +#IF(GTK_LIBRARIES) +# IF((GTK_INCLUDE_DIR OR CMAKE_GTK_CXX_FLAGS) AND GTK_VERSION_2) +# SET(GTK_FOUND 1) +# SET (GTK_LIBRARIES ${GTK1_LIBRARIES}) +# SET(CMAKE_GTK_CXX_FLAGS ${CMAKE_GTK2_CXX_FLAGS}) +# ENDIF((GTK_INCLUDE_DIR OR CMAKE_GTK_CXX_FLAGS) AND GTK_VERSION_2) +# +# IF(GTK2_INCLUDE_DIR OR CMAKE_GTK2_CXX_FLAGS) +# SET(GTK2_FOUND 1) +# ENDIF(GTK2_INCLUDE_DIR OR CMAKE_GTK2_CXX_FLAGS) +# +#ENDIF(GTK_LIBRARIES) + + + + +IF(GTK1_LIBRARIES OR GTK2_LIBRARIES) + + IF(GTK_VERSION_2) + #looking for GTK2.x + IF(CMAKE_GTK2_CXX_FLAGS) + SET(GTK_FOUND 1) + SET (GTK_LIBRARIES ${GTK2_LIBRARIES}) + SET(CMAKE_GTK_CXX_FLAGS ${CMAKE_GTK2_CXX_FLAGS}) + ENDIF(CMAKE_GTK2_CXX_FLAGS) + ELSE(GTK_VERSION_2) + #looking for GTK1.x + IF(CMAKE_GTK1_CXX_FLAGS) + SET(GTK_FOUND 1) + SET (GTK_LIBRARIES ${GTK1_LIBRARIES}) + SET(CMAKE_GTK_CXX_FLAGS ${CMAKE_GTK1_CXX_FLAGS}) + ENDIF(CMAKE_GTK1_CXX_FLAGS) + ENDIF(GTK_VERSION_2) +ENDIF(GTK1_LIBRARIES OR GTK2_LIBRARIES) diff --git a/lib/maracasVisuLib/include/Modules/FindGTK2.cmake b/lib/maracasVisuLib/include/Modules/FindGTK2.cmake new file mode 100644 index 0000000..468702b --- /dev/null +++ b/lib/maracasVisuLib/include/Modules/FindGTK2.cmake @@ -0,0 +1,328 @@ + +IF (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS) + # in cache already + SET(GTK2_FOUND TRUE) +ELSE (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS) + IF(UNIX) + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + INCLUDE(UsePkgConfig) + + PKGCONFIG(gtk-2.0 _GTK22IncDir _GTK22LinkDir _GTK22LinkFlags _GTK22Cflags) + + FIND_PATH(GTK2_GTK_INCLUDE_PATH gtk/gtk.h + $ENV{GTK2_HOME} + ${_GTK22IncDir} + /usr/include/gtk-2.0 + /usr/local/include/gtk-2.0 + /opt/include/gtk-2.0 + /opt/gnome/include/gtk-2.0 + /sw/include/gtk-2.0 + ) + + # Some Linux distributions (e.g. Red Hat) have glibconfig.h + # and glib.h in different directories, so we need to look + # for both. + # - Atanas Georgiev + PKGCONFIG(glib-2.0 _GLIB2IncDir _GLIB2inkDir _GLIB2LinkFlags _GLIB2Cflags) + PKGCONFIG(gmodule-2.0 _GMODULE2IncDir _GMODULE2inkDir _GMODULE2LinkFlags _GMODULE2Cflags) + SET(GDIR /opt/gnome/lib/glib-2.0/include) + + FIND_PATH(GTK2_GLIBCONFIG_INCLUDE_PATH glibconfig.h + ${_GLIB2IncDir} + /opt/gnome/lib64/glib-2.0/include + /opt/gnome/lib/glib-2.0/include + /opt/lib/glib-2.0/include + /usr/lib64/glib-2.0/include + /usr/lib/glib-2.0/include + /sw/lib/glib-2.0/include + ) + #MESSAGE(STATUS "DEBUG: GTK2_GLIBCONFIG_INCLUDE_PATH = ${GTK2_GLIBCONFIG_INCLUDE_PATH}") + + FIND_PATH(GTK2_GLIB_INCLUDE_PATH glib.h + ${_GLIB2IncDir} + /opt/include/glib-2.0 + /opt/gnome/include/glib-2.0 + /usr/include/glib-2.0 + /sw/include/glib-2.0 + ) + #MESSAGE(STATUS "DEBUG: GTK2_GLIBCONFIG_INCLUDE_PATH = ${GTK2_GLIBCONFIG_INCLUDE_PATH}") + + FIND_PATH(GTK2_GTKGL_INCLUDE_PATH gtkgl/gtkglarea.h + ${_GLIB2IncDir} + /usr/include + /usr/local/include + /usr/openwin/share/include + /opt/gnome/include + /opt/include + /sw/include + ) + + PKGCONFIG(pango _PANGOIncDir _PANGOinkDir _PANGOLinkFlags _PANGOCflags) + + FIND_PATH(GTK2_PANGO_INCLUDE_PATH pango/pango.h + ${_PANGOIncDir} + /opt/gnome/include/pango-1.0 + /opt/include/pango-1.0 + /usr/include/pango-1.0 + /sw/include/pango-1.0 + ) + + PKGCONFIG(gdk-2.0 _GDK2IncDir _GDK2inkDir _GDK2LinkFlags _GDK2Cflags) + + FIND_PATH(GTK2_GDKCONFIG_INCLUDE_PATH gdkconfig.h + ${_GDK2IncDir} + /opt/gnome/lib/gtk-2.0/include + /opt/gnome/lib64/gtk-2.0/include + /opt/lib/gtk-2.0/include + /usr/lib/gtk-2.0/include + /usr/lib64/gtk-2.0/include + /sw/lib/gtk-2.0/include + ) + + # Dave: + FIND_PATH(GTK2_GDK_INCLUDE_PATH gdk.h + ${_GDK2IncDir} + /usr/include/gtk-2.0 + /usr/include/gtk-2.0/gdk + ) + #MESSAGE(STATUS "DEBUG: GTK2_GLIBCONFIG_INCLUDE_PATH = ${GTK2_GLIBCONFIG_INCLUDE_PATH}") + + PKGCONFIG(cairo _CAIROIncDir _CAIROinkDir _CAIROLinkFlags _CAIROCflags) + + FIND_PATH(GTK2_CAIRO_INCLUDE_PATH cairo.h + ${_CAIROIncDir} + /opt/gnome/include/cairo + /usr/include + /usr/include/cairo + /opt/include + /opt/include/cairo + /sw/include + /sw/include/cairo + ) + #MESSAGE(STATUS "DEBUG: GTK2_CAIRO_INCLUDE_PATH = ${GTK2_CAIRO_INCLUDE_PATH}") + + PKGCONFIG(atk _ATKIncDir _ATKinkDir _ATKLinkFlags _ATKCflags) + + FIND_PATH(GTK2_ATK_INCLUDE_PATH atk/atk.h + ${_ATKIncDir} + /opt/gnome/include/atk-1.0 + /usr/include/atk-1.0 + /opt/include/atk-1.0 + /sw/include/atk-1.0 + ) + #MESSAGE(STATUS "DEBUG: GTK2_ATK_INCLUDE_PATH = ${GTK2_ATK_INCLUDE_PATH}") + + FIND_LIBRARY(GTK2_GTKGL_LIBRARY + NAMES + gtkgl + PATHS + ${_GTK22IncDir} + /usr/lib + /usr/local/lib + /usr/openwin/lib + /usr/X11R6/lib + /opt/gnome/lib + /opt/lib + /sw/lib + ) + + FIND_LIBRARY(GTK2_GTK_LIBRARY + NAMES + gtk-x11-2.0 + PATHS + ${_GTK22LinkDir} + /usr/lib + /usr/local/lib + /usr/openwin/lib + /usr/X11R6/lib + /opt/gnome/lib + /opt/lib + /sw/lib + ) + + FIND_LIBRARY(GTK2_GDK_LIBRARY + NAMES + gdk-x11-2.0 + PATHS + ${_GDK2LinkDir} + /usr/lib + /usr/local/lib + /usr/openwin/lib + /usr/X11R6/lib + /opt/gnome/lib + /opt/lib + /sw/lib + ) + + FIND_LIBRARY(GTK2_GMODULE_LIBRARY + NAMES + gmodule-2.0 + PATHS + ${_GMODULE2inkDir} + /usr/lib + /usr/local/lib + /usr/openwin/lib + /usr/X11R6/lib + /opt/gnome/lib + /opt/lib + /sw/lib + ) + + FIND_LIBRARY(GTK2_GLIB_LIBRARY + NAMES + glib-2.0 + PATHS + ${_GLIB2inkDir} + /usr/lib + /usr/local/lib + /usr/openwin/lib + /usr/X11R6/lib + /opt/gnome/lib + /opt/lib + /sw/lib + ) + + FIND_LIBRARY(GTK2_Xi_LIBRARY + NAMES + Xi + PATHS + /usr/lib + /usr/local/lib + /usr/openwin/lib + /usr/X11R6/lib + /opt/gnome/lib + /opt/lib + /sw/lib + ) + + FIND_LIBRARY(GTK2_GTHREAD_LIBRARY + NAMES + gthread-2.0 + PATHS + /usr/lib + /usr/local/lib + /usr/openwin/lib + /usr/X11R6/lib + /opt/gnome/lib + /opt/lib + /sw/lib + ) + + + FIND_LIBRARY(GTK2_GOBJECT_LIBRARY + NAMES + gobject-2.0 + PATHS + /usr/lib + /usr/local/lib + /usr/openwin/lib + /usr/X11R6/lib + /opt/gnome/lib + /opt/lib + /sw/lib + ) + + IF(GTK2_GTK_INCLUDE_PATH) + IF(GTK2_GLIBCONFIG_INCLUDE_PATH) + IF(GTK2_GLIB_INCLUDE_PATH) + IF(GTK2_GTK_LIBRARY) + IF(GTK2_GLIB_LIBRARY) + IF(GTK2_PANGO_INCLUDE_PATH) + IF(GTK2_ATK_INCLUDE_PATH) + IF(GTK2_CAIRO_INCLUDE_PATH) + # Assume that if gtk and glib were found, the other + # supporting libraries have also been found. + + SET(GTK2_FOUND TRUE) + + SET(GTK2_INCLUDE_DIRS + ${GTK2_GTK_INCLUDE_PATH} + ${GTK2_GLIBCONFIG_INCLUDE_PATH} + ${GTK2_GLIB_INCLUDE_PATH} + ${GTK2_PANGO_INCLUDE_PATH} + ${GTK2_GDKCONFIG_INCLUDE_PATH} + # Dave: + ${GTK2_GDK_INCLUDE_PATH} + ${GTK2_ATK_INCLUDE_PATH} + ${GTK2_CAIRO_INCLUDE_PATH} + ) + + SET(GTK2_LIBRARIES + ${GTK2_GTK_LIBRARY} + ${GTK2_GDK_LIBRARY} + ${GTK2_GLIB_LIBRARY} + ) + #${GTK2_GOBJECT_LIBRARY}) + + IF(GTK2_GMODULE_LIBRARY) + SET(GTK2_LIBRARIES + ${GTK2_LIBRARIES} + ${GTK2_GMODULE_LIBRARY} + ) + ENDIF(GTK2_GMODULE_LIBRARY) + + IF(GTK2_GTHREAD_LIBRARY) + SET(GTK2_LIBRARIES + ${GTK2_LIBRARIES} + ${GTK2_GTHREAD_LIBRARY} + ) + SET(GTK2_LIBRARIES ${GTK2_LIBRARIES}) + ENDIF(GTK2_GTHREAD_LIBRARY) + ELSE(GTK2_CAIRO_INCLUDE_PATH) + MESSAGE(STATUS "Can not find cairo") + ENDIF(GTK2_CAIRO_INCLUDE_PATH) + ELSE(GTK2_ATK_INCLUDE_PATH) + MESSAGE(STATUS "Can not find atk") + ENDIF(GTK2_ATK_INCLUDE_PATH) + ELSE(GTK2_PANGO_INCLUDE_PATH) + MESSAGE(STATUS "Can not find pango includes") + ENDIF(GTK2_PANGO_INCLUDE_PATH) + ELSE(GTK2_GLIB_LIBRARY) + MESSAGE(STATUS "Can not find glib lib") + ENDIF(GTK2_GLIB_LIBRARY) + ELSE(GTK2_GTK_LIBRARY) + MESSAGE(STATUS "Can not find gtk lib") + ENDIF(GTK2_GTK_LIBRARY) + ELSE(GTK2_GLIB_INCLUDE_PATH) + MESSAGE(STATUS "Can not find glib includes") + ENDIF(GTK2_GLIB_INCLUDE_PATH) + ELSE(GTK2_GLIBCONFIG_INCLUDE_PATH) + MESSAGE(STATUS "Can not find glibconfig") + ENDIF(GTK2_GLIBCONFIG_INCLUDE_PATH) + ELSE (GTK2_GTK_INCLUDE_PATH) + MESSAGE(STATUS "Can not find gtk includes") + ENDIF (GTK2_GTK_INCLUDE_PATH) + + IF (GTK2_FOUND) + IF (NOT GTK2_FIND_QUIETLY) + MESSAGE(STATUS "Found GTK2: ${GTK2_LIBRARIES}") + ENDIF (NOT GTK2_FIND_QUIETLY) + ELSE (GTK2_FOUND) + IF (GTK2_FIND_REQUIRED) + MESSAGE(SEND_ERROR "Could NOT find GTK2") + ENDIF (GTK2_FIND_REQUIRED) + ENDIF (GTK2_FOUND) + + MARK_AS_ADVANCED( + GTK2_GDK_LIBRARY + GTK2_GLIB_INCLUDE_PATH + GTK2_GLIB_LIBRARY + GTK2_GLIBCONFIG_INCLUDE_PATH + GTK2_GMODULE_LIBRARY + GTK2_GTHREAD_LIBRARY + GTK2_Xi_LIBRARY + GTK2_GTK_INCLUDE_PATH + GTK2_GTK_LIBRARY + GTK2_GTKGL_INCLUDE_PATH + GTK2_GTKGL_LIBRARY + GTK2_ATK_INCLUDE_PATH + GTK2_GDKCONFIG_INCLUDE_PATH + # Dave: + GTK2_GDK_INCLUDE_PATH + #GTK2_GOBJECT_LIBRARY + GTK2_PANGO_INCLUDE_PATH + ) + ENDIF(UNIX) +ENDIF (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS) + diff --git a/lib/maracasVisuLib/include/Modules/FindKGFO.cmake b/lib/maracasVisuLib/include/Modules/FindKGFO.cmake new file mode 100644 index 0000000..2f4d3d9 --- /dev/null +++ b/lib/maracasVisuLib/include/Modules/FindKGFO.cmake @@ -0,0 +1,85 @@ +# +# This module finds if kgfo is installed and determines where the +# include files and libraries are. It also determines what the name of +# the library is. This code sets the following variables: +# +# KGFO_FOUND = system has kgfo and it should be used +# KGFO_LIBRARIES = full path to the kgfo library and linker flags on unix +# CMAKE_KGFO_CXX_FLAGS = compiler flags for building kgfo +# KGFO_INCLUDE_DIR = include path of kgfo + +IF(WIN32) + IF(NOT UNIX) + + SET (KGFO_POSSIBLE_LIB_PATHS + $ENV{KGFO}/lib + $ENV{CREATIS}/kgfo/win32inst/lib + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\kgfo_is1;Inno Setup: App Path]/lib" + ) + + FIND_LIBRARY(KGFO_STATIC_LIBRARY + NAMES kgfo + PATHS ${KGFO_POSSIBLE_LIB_PATHS} + ) + + FIND_LIBRARY(KGFO_SHARED_LIBRARY + NAMES kgfo + PATHS ${KGFO_POSSIBLE_LIB_PATHS} + ) + + SET (KGFO_POSSIBLE_INCLUDE_PATHS + $ENV{KGFO}/include + $ENV{CREATIS}/kgfo/win32inst/include + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\kgfo_is1;Inno Setup: App Path]/include" + ) + + FIND_PATH(KGFO_INCLUDE_DIR + kgfo/kgfo-setup.hxx + ${KGFO_POSSIBLE_INCLUDE_PATHS} + ) + + IF(KGFO_SHARED_LIBRARY) + OPTION(KGFO_USE_SHARED_LIBS + "Use shared versions of kgfo libraries" ON) + MARK_AS_ADVANCED(KGFO_USE_SHARED_LIBS) + ENDIF(KGFO_SHARED_LIBRARY) + + SET(CMAKE_KGFO_LIBRARIES ${CMAKE_KGFO_LIBRARIES}) # comctl32 ctl3d32 wsock32 rpcrt4) + + IF(KGFO_USE_SHARED_LIBS) + SET(KGFO_LIBRARIES ${KGFO_SHARED_LIBRARY} ${CMAKE_KGFO_LIBRARIES}) + ADD_DEFINITIONS(-DKGFO_USING_DLL) + ELSE(KGFO_USE_SHARED_LIBS) + SET(KGFO_LIBRARIES ${KGFO_STATIC_LIBRARY} ${CMAKE_KGFO_LIBRARIES}) + ENDIF(KGFO_USE_SHARED_LIBS) + + MARK_AS_ADVANCED( + KGFO_STATIC_LIBRARY + KGFO_SHARED_LIBRARY + KGFO_INCLUDE_DIR + ) + + ENDIF(NOT UNIX) +ENDIF(WIN32) + +IF(UNIX) + + FIND_PROGRAM(CMAKE_KGFO_CONFIG kgfo-config ../kgfo/bin ../../kgfo/bin) + SET(CMAKE_KGFO_CXX_FLAGS "`${CMAKE_KGFO_CONFIG} --cflags`") + SET(KGFO_LIBRARIES "`${CMAKE_KGFO_CONFIG} --libs`") + +ENDIF(UNIX) + +MARK_AS_ADVANCED( + CMAKE_KGFO_CONFIG + CMAKE_KGFO_CXX_FLAGS + KGFO_INCLUDE_DIR +) + +IF(KGFO_LIBRARIES) + IF(KGFO_INCLUDE_DIR OR CMAKE_KGFO_CXX_FLAGS) + SET(CMAKE_KGFO_CAN_COMPILE 1) + SET(KGFO_FOUND 1) + ENDIF(KGFO_INCLUDE_DIR OR CMAKE_KGFO_CXX_FLAGS) +ENDIF(KGFO_LIBRARIES) + diff --git a/lib/maracasVisuLib/include/Modules/FindLibido.cmake b/lib/maracasVisuLib/include/Modules/FindLibido.cmake new file mode 100644 index 0000000..047eb69 --- /dev/null +++ b/lib/maracasVisuLib/include/Modules/FindLibido.cmake @@ -0,0 +1,71 @@ +# +# This module finds if Python is installed and determines where the +# include files and libraries are. It also determines what the name of +# the library is. This code sets the following variables: +# +# LIBIDO_SOURCE_DIR = the full path containing the sources +# LIBIDO_BINARY_DIR = the full path containing the binaries +# LIBIDO_INCLUDE_PATHS = the paths to where .h files can be found +# LIBIDO_LIBRARIES = the full path to the library found +# LIBIDO_DEBUG_LIBRARIES = the full path to the debug library found +# + +#----------------------------------------------------------------------------- +INCLUDE(${CMAKE_ROOT}/Modules/CMakeFindFrameworks.cmake) + +#----------------------------------------------------------------------------- +IF(${libIdo_DIR}) + SET(LIBIDO_SOURCE_DIR ${libIdo_DIR} CACHE PATH "libIdo source directory") + SET(LIBIDO_BINARY_DIR ${libIdo_DIR} CACHE PATH "libIdo binary directory") +ENDIF(${libIdo_DIR}) + +IF(NOT LIBIDO_SOURCE_DIR) + FIND_PATH( LIBIDO_SOURCE_DIR libido.spec.in $ENV{LIBIDO_SRC} ) + SET(LIBIDO_SOURCE_DIR ${LIBIDO_SOURCE_DIR} CACHE PATH "libIdo source directory") +ELSE(NOT LIBIDO_SOURCE_DIR) + INCLUDE_DIRECTORIES(${LIBIDO_SOURCE_DIR}) +ENDIF(NOT LIBIDO_SOURCE_DIR) + + + +IF(NOT LIBIDO_BINARY_DIR) + FIND_PATH( LIBIDO_BINARY_DIR libIdoConfig.cmake paths $ENV{LIBIDO_PATH} ) + SET(LIBIDO_BINARY_DIR ${LIBIDO_BINARY_DIR} CACHE PATH "libIdo binary directory") +ENDIF(NOT LIBIDO_BINARY_DIR) + + +#----------------------------------------------------------------------------- +# Set libIdo compilation variables +FIND_PATH(LIBIDO_INCLUDE_PATH NAME idima.h + PATHS ${LIBIDO_SOURCE_DIR}/src + DOC "libIdo include path" +) +FIND_LIBRARY(LIBIDO_LIBRARY name Ido libIdo + PATHS ${LIBIDO_BINARY_DIR}/lib/release + ${LIBIDO_BINARY_DIR}/lib + DOC "libIdo library" +) +FIND_LIBRARY(LIBIDO_DEBUG_LIBRARY name Ido libIdo + PATHS ${LIBIDO_BINARY_DIR}/lib/debug + ${LIBIDO_BINARY_DIR}/lib + DOC "libIdo debug library" +) + +IF(WIN32) + MARK_AS_ADVANCED(FORCE + GLIB_INCLUDE_PATH + GLIB_LIBRARY + ) +ENDIF(WIN32) +MARK_AS_ADVANCED(FORCE + LIBIDO_SOURCE_DIR + LIBIDO_BINARY_DIR + LIBIDO_INCLUDE_PATH + LIBIDO_LIBRARY + LIBIDO_DEBUG_LIBRARY +) + +SET(LIBIDO_INCLUDE_PATHS "${LIBIDO_INCLUDE_PATH}") +SET(LIBIDO_LIBRARIES "${LIBIDO_LIBRARY}") +SET(LIBIDO_DEBUG_LIBRARIES "${LIBIDO_DEBUG_LIBRARY}") + diff --git a/lib/maracasVisuLib/include/Modules/FindMySQL.cmake b/lib/maracasVisuLib/include/Modules/FindMySQL.cmake new file mode 100644 index 0000000..1492482 --- /dev/null +++ b/lib/maracasVisuLib/include/Modules/FindMySQL.cmake @@ -0,0 +1,49 @@ +# - Find MySQL +# Find the MySQL includes and client library +# This module defines +# MYSQL_INCLUDE_DIR, where to find mysql.h +# MYSQL_LIBRARIES, the libraries needed to use MySQL. +# MYSQL_FOUND, If false, do not try to use MySQL. +# +# Copyright (c) 2006, Jaroslaw Staniek, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +if(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES) + set(MYSQL_FOUND TRUE) + +else(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES) + + find_path(MYSQL_INCLUDE_DIR mysql.h + /usr/include/mysql + /usr/local/include/mysql + $ENV{ProgramFiles}/MySQL/*/include + $ENV{SystemDrive}/MySQL/*/include + ) + +if(WIN32 AND MSVC) + find_library(MYSQL_LIBRARIES NAMES libmysql + PATHS + $ENV{ProgramFiles}/MySQL/*/lib/opt + $ENV{SystemDrive}/MySQL/*/lib/opt + ) +else(WIN32 AND MSVC) + find_library(MYSQL_LIBRARIES NAMES mysqlclient + PATHS + /usr/lib/mysql + /usr/local/lib/mysql + ) +endif(WIN32 AND MSVC) + + if(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES) + set(MYSQL_FOUND TRUE) + message(STATUS "Found MySQL: ${MYSQL_INCLUDE_DIR}, ${MYSQL_LIBRARIES}") + else(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES) + set(MYSQL_FOUND FALSE) + message(STATUS "MySQL not found.") + endif(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES) + + mark_as_advanced(MYSQL_INCLUDE_DIR MYSQL_LIBRARIES) + +endif(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES) diff --git a/lib/maracasVisuLib/include/Modules/FindwxGlade.cmake b/lib/maracasVisuLib/include/Modules/FindwxGlade.cmake new file mode 100644 index 0000000..68789b5 --- /dev/null +++ b/lib/maracasVisuLib/include/Modules/FindwxGlade.cmake @@ -0,0 +1,54 @@ +# +# This module finds if WXGLADE is installed and determines where the +# include files and libraries are. It also determines what the name of +# the library is. This code sets the following variables: +# +# WXGLADE_FOUND = system has WXGLADE and it should be used +# WXGLADE_EXECUTABLE = path to the program itself + +IF(WIN32) +IF(NOT UNIX) + SET (WXGLADE_POSSIBLE_LIB_PATHS + $ENV{WXGLADE} + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\wxGlade_is1;Inno Setup: App Path]" + ) + + FIND_PROGRAM(WXGLADE_EXECUTABLE + wxglade + ${WXGLADE_POSSIBLE_LIB_PATHS} + ) + +ENDIF(NOT UNIX) +ENDIF(WIN32) + +IF(UNIX) + + #rpm put a /usr/bin/wxglade which link to: + #/usr/lib/wxGlade/wxglade.py + +# FIND_PROGRAM(WXGLADE_EXECUTABLE +# wxglade +# /usr/bin +# ) + + FIND_PROGRAM(WXGLADE_EXECUTABLE + wxglade.py + /usr/lib/wxGlade + /usr/local/lib/wxGlade + ) + + FIND_PROGRAM(XRC2WXG_EXECUTABLE + xrc2wxg.py + /usr/lib/wxGlade + /usr/local/lib/wxGlade + ) + +ENDIF(UNIX) + +MARK_AS_ADVANCED( + WXGLADE_EXECUTABLE +) + +IF(WXGLADE_EXECUTABLE) + SET(WXGLADE_FOUND 1) +ENDIF(WXGLADE_EXECUTABLE) diff --git a/lib/maracasVisuLib/include/Modules/FindwxW.cmake b/lib/maracasVisuLib/include/Modules/FindwxW.cmake new file mode 100644 index 0000000..a03d731 --- /dev/null +++ b/lib/maracasVisuLib/include/Modules/FindwxW.cmake @@ -0,0 +1,573 @@ +# +# FindwxW.cmake +# v1.06 2006-03-27 +# Jerry Fath 2005 +# Based on work by Jorgen Bodde +# +# This module finds if wxWindows is installed and determines where the +# include files and libraries are. It also determines what the name of +# the library is. This code sets the following variables: +# +# WXWIDGETS_FOUND = wxWidgets was found +# WXWIDGETS_ROOT_DIR = base wxWidgets directory +# WXWIDGETS_LINK_DIRECTORIES = link directories, useful for rpath on Unix +# WXWIDGETS_LIBRARIES = all the wxWindows libraries ( and linker flags on unix ) +# WXWIDGETS_CXX_FLAGS = compiler flags for building wxWindows +# WXWIDGETS_EXE_LINKER_FLAGS = compiler flags for building wxWindows +# WXWIDGETS_INCLUDE_DIR = all include path of wxWindows +# WXWIDGETS_DEFINITIONS = all flags of wxWindows +# +# WXWIDGETS_RELEASE_LIBRARIES = release wxWindows libraries (Win32 only) +# WXWIDGETS_DEBUG_LIBRARIES = debug wxWindows libraries (Win32 only) +# WXWIDGETS_COMMON_LIBRARIES = libraries common to Release and Debug (Win32 only) + +# NOTE: This module REQUIRES that an environment variable named WXWIN +# be set to the base wxWidgets installation directory. +# Under Unix, you must also set and environment variable named WXWINCFG +# to the name of the active build subdirectory (eg buildgtk). As an alternative +# to the WXWINCFG environment variable, you can set a sym link in the wxWidgets +# root directory called wx-config which points to the active build subdirectory. +# + +# These variable should be set before including this module +# +# WXWIDGETS_FILE_VERSION (26) +# WXWIDGETS_VERSION (2.6) +# +# + +####################### EXAMPLE CMakeLists.txt ################### +# +##Required project specific settings +#PROJECT( myprojectname ) +#SET(PROJECT_SOURCE_FILES myfile.cpp myfile2.cpp) +#IF( WIN32) +# SET(PROJECT_RC_FILE myresfile.rc) +#ELSE( WIN32) +# SET(PROJECT_RC_FILE "") +#ENDIF( WIN32) +# +##Optional project specific settings +#SET(PROJECT_DEFINITIONS -D_MYPROJECT_ -D_MYPROJECT2_) +#SET(PROJECT_INCLUDE_PATH e:/myproject/include e:/myproject2/include) +#SET(PROJECT_LINK_DIRECTORIES e:/myproject/lib e:/myproject2/lib) +#SET(PROJECT_LIBRARIES myprojectlib myproject2lib) +# +##wxWidgets build related stuff +#SET(WXW_USE_DEBUG OFF) +#SET(WXW_USE_UNICODE OFF) +#SET(WXW_USE_SHARED OFF) +#SET(WXW_USE_UNIV OFF) +#SET(WXW_USE_MONO OFF) +#SET(WXW_FILE_VERSION "26") +#SET(WXW_VERSION "2.6") +# +#INCLUDE (FindwxW) +#INCLUDE (UsewxW) +# +####################### END EXAMPLE CMakeLists.txt ################### + +# +# Set WX_USE vars in CMakeLists if you don't want to default to all off +# +SET(WXWIDGETS_USE_DEBUG ${WXW_USE_DEBUG} CACHE BOOL "Use Debug versions of wxWindows libraries") +SET(WXWIDGETS_USE_UNICODE ${WXW_USE_UNICODE} CACHE BOOL "Use Unicode versions of wxWindows libraries") +SET(WXWIDGETS_USE_SHARED ${WXW_USE_SHARED} CACHE BOOL "Use shared versions of wxWindows libraries") +SET(WXWIDGETS_USE_UNIV ${WXW_USE_UNIV} CACHE BOOL "Use Universal versions of wxWindows libraries") +SET(WXWIDGETS_USE_MONO ${WXW_USE_MONO} CACHE BOOL "Use monolithic versions of wxWindows libraries") + +# +# Style can be non-Win32 even under Windows when using MinGW +# +IF(WIN32) + SET(WIN32_STYLE_FIND 1) +ENDIF(WIN32) +IF(MINGW) + SET(WIN32_STYLE_FIND 0) + SET(UNIX_STYLE_FIND 1) +ENDIF(MINGW) +IF(UNIX) + SET(UNIX_STYLE_FIND 1) +ENDIF(UNIX) + +# +# Versions should be set before this file is included. If not, +# default to 2.6 +# +IF(WXW_FILE_VERSION) + SET( WXVERSIONSUFFIX ${WXW_FILE_VERSION}) +ELSE(WXW_FILE_VERSION) + SET( WXVERSIONSUFFIX "26") +ENDIF(WXW_FILE_VERSION) + +IF(WXW_VERSION) + SET( WXVERSION ${WXW_VERSION}) +ELSE(WXW_VERSION) + SET( WXVERSION "2.6") +ENDIF(WXW_VERSION) + +# +# Find the base wxWidgets install path +# NOTE: WXWIN must be set +# +FIND_PATH( WXWIDGETS_ROOT_DIR + wx-config.in + $ENV{WXWIN} +) +IF(WXWIDGETS_ROOT_DIR STREQUAL "WXWIDGETS_ROOT_DIR-NOTFOUND") + MESSAGE( FATAL_ERROR "FATAL_ERROR: wx-config.in NOT found. Set WXWIN") +ENDIF(WXWIDGETS_ROOT_DIR STREQUAL "WXWIDGETS_ROOT_DIR-NOTFOUND") +SET(WXWIDGETS_CONFIG_PATH ${WXWIDGETS_ROOT_DIR}) + +# +# Find library path (platform specific) +# +IF( WIN32_STYLE_FIND ) + + IF( WXWIDGETS_USE_SHARED ) + SET(WXWIDGETS_LIB_PATH "${WXWIDGETS_ROOT_DIR}/lib/vc_dll" ) + ELSE( WXWIDGETS_USE_SHARED ) + SET(WXWIDGETS_LIB_PATH "${WXWIDGETS_ROOT_DIR}/lib/vc_lib" ) + ENDIF( WXWIDGETS_USE_SHARED ) + SET( WXWIDGETS_LINK_DIRECTORIES ${WXWIDGETS_LIB_PATH} ) + +ELSE( WIN32_STYLE_FIND ) + IF (UNIX_STYLE_FIND) + + # + # Unix uses a config specific directory under the install path + # specified in the WXWINCFG environment variable. + # If the WXWINCFG variable isn't set, we try a sym link within + # the WX root dir called wx-config, or the current PATH + # + FIND_PROGRAM( WX_WXCONFIG_EXECUTABLE + wx-config + "${WXWIDGETS_ROOT_DIR}/$ENV{WXWINCFG}" + "${WXWIDGETS_ROOT_DIR}/wx-config" ) + # + # Check wether wx-config can be found + # + IF(NOT EXISTS ${WX_WXCONFIG_EXECUTABLE}) + # we really need wx-config... + MESSAGE(FATAL_ERROR "FATAL_ERROR: Cannot find wx-config. Set WXWIN and WXWINCFG environment variables.") + ENDIF(NOT EXISTS ${WX_WXCONFIG_EXECUTABLE}) + + GET_FILENAME_COMPONENT( WXWIDGETS_CONFIG_PATH + WX_WXCONFIG_EXECUTABLE + PATH ) + + SET(WXWIDGETS_LIB_PATH "${WXWIDGETS_CONFIG_PATH}/lib" ) + SET( WXWIDGETS_LINK_DIRECTORIES ${WXWIDGETS_LIB_PATH} ) + + ELSE(UNIX_STYLE_FIND) + MESSAGE(FATAL_ERROR "FATAL_ERROR: FindwxWindows.cmake: Platform unsupported by FindwxW.cmake. It's neither WIN32 nor UNIX") + ENDIF(UNIX_STYLE_FIND) +ENDIF( WIN32_STYLE_FIND ) + +# +# Check options against installed libraries +# +SET(WX_CONFIG_ARGS "") +SET( LIBRARYWANT "${WXWIDGETS_LIB_PATH}/msw" ) + +IF( WXWIDGETS_USE_UNIV ) + SET( LIBRARYWANT "${LIBRARYWANT}univ") + SET( PFUNIV "univ" ) + SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS} --universal=yes") +ELSE( WXWIDGETS_USE_UNIV ) + SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS} --universal=no") +ENDIF( WXWIDGETS_USE_UNIV ) + +IF( WXWIDGETS_USE_UNICODE ) + SET( LIBRARYWANT "${LIBRARYWANT}u" ) + SET( PFUNICODE "u" ) + SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS} --unicode=yes") +ELSE( WXWIDGETS_USE_UNICODE ) + SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS} --unicode=no") +ENDIF( WXWIDGETS_USE_UNICODE ) + +IF( WXWIDGETS_USE_DEBUG ) + SET( PFDEBUG "d" ) + SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS} --debug=yes") +ELSE( WXWIDGETS_USE_DEBUG ) + SET( PFDEBUG "" ) + SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS} --debug=no") +ENDIF( WXWIDGETS_USE_DEBUG ) + +IF( WXWIDGETS_USE_SHARED ) + SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS} --static=no") +ELSE( WXWIDGETS_USE_SHARED ) + SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS} --static=yes") +ENDIF( WXWIDGETS_USE_SHARED ) + +# Not sure how to check this yet!!!!! +IF( WXWIDGETS_USE_MONO ) + SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS}") +ELSE( WXWIDGETS_USE_MONO ) + SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS}") +ENDIF( WXWIDGETS_USE_MONO ) + +SET(WX_CONFIG_ARGS_LIBS "${WX_CONFIG_ARGS} --libs") + +# +# Platform specific method for testing installed wx Builds +# +IF( WIN32_STYLE_FIND ) + + # + # See if we have both release and debug wx versions + # + SET ( WX_DEBUGANDRELEASE FALSE ) + IF( EXISTS "${LIBRARYWANT}/wx/setup.h" ) + IF( EXISTS "${LIBRARYWANT}d/wx/setup.h" ) + SET ( WX_DEBUGANDRELEASE TRUE ) + ENDIF( EXISTS "${LIBRARYWANT}d/wx/setup.h" ) + ENDIF( EXISTS "${LIBRARYWANT}/wx/setup.h" ) + + SET( LIBRARYWANT "${LIBRARYWANT}${PFDEBUG}" ) + IF( NOT EXISTS "${LIBRARYWANT}/wx/setup.h" ) + MESSAGE( SEND_ERROR "ERROR: WXWidgets config NOT found ${WX_CONFIG_ARGS}") + ENDIF( NOT EXISTS "${LIBRARYWANT}/wx/setup.h" ) + +ELSE( WIN32_STYLE_FIND ) + + EXEC_PROGRAM(${WX_WXCONFIG_EXECUTABLE} + ARGS ${WX_CONFIG_ARGS_LIBS} + OUTPUT_VARIABLE WXWIDGETS_LIBRARIES + RETURN_VALUE BAD_WXCONFIG ) + IF(BAD_WXCONFIG) + MESSAGE( SEND_ERROR "ERROR: WXWidgets config NOT found ${WX_CONFIG_ARGS}") + ENDIF(BAD_WXCONFIG) + +ENDIF( WIN32_STYLE_FIND ) + +# +# Get compiler flags +# +IF( WIN32_STYLE_FIND ) + # Not used for Windows + SET( WXWIDGETS_CXX_FLAGS "" ) +ELSE( WIN32_STYLE_FIND ) + # + # Get CXXFLAGS from wx-config + # + EXEC_PROGRAM(${WX_WXCONFIG_EXECUTABLE} + ARGS "--cxxflags" + OUTPUT_VARIABLE WXWIDGETS_CXX_FLAGS + RETURN_VALUE BAD_WXCONFIG ) + IF (BAD_WXCONFIG) + MESSAGE( SEND_ERROR "ERROR: wx-config --cxxflags returned an error") + ENDIF (BAD_WXCONFIG) +ENDIF( WIN32_STYLE_FIND ) + +# +# Find include directories (platform specific) +# +IF( WIN32_STYLE_FIND ) + # + # Set non-build specific include directories + # + SET ( WX_INCLUDE_PATH ${WXWIDGETS_ROOT_DIR}/include ) + SET ( WXWIDGETS_INCLUDE_DIR ${WX_INCLUDE_PATH} ) + SET( WXWIDGETS_INCLUDE_DIR ${WXWIDGETS_INCLUDE_DIR} ${WXWIDGETS_INCLUDE_DIR}/../contrib/include ) + # + # Append the build specific include dir for wx/setup.h: + # + IF ( EXISTS ${LIBRARYWANT}/wx/setup.h ) + SET( WX_INCLUDE_LIB_PATH ${LIBRARYWANT}) + SET( WXWIDGETS_INCLUDE_DIR ${WXWIDGETS_INCLUDE_DIR} ${LIBRARYWANT} ) + ELSE ( EXISTS ${LIBRARYWANT}/wx/setup.h ) + SET( WX_INCLUDE_LIB_PATH, "") + MESSAGE(SEND_ERROR "ERROR: Can't find ${LIBRARYWANT}/wx/setup.h") + ENDIF ( EXISTS ${LIBRARYWANT}/wx/setup.h ) + +ELSE( WIN32_STYLE_FIND ) + + # Pull out -I options + # evaluate wx-config output to separate include dirs + SET(WX_INCLUDE_DIR ${WXWIDGETS_CXX_FLAGS}) + # extract include dirs (-I) + # use regular expression to match wildcard equivalent "-I*" + # with is a space or a semicolon + STRING(REGEX MATCHALL "[-][I]([^ ;])+" WX_INCLUDE_DIRS_WITH_PREFIX "${WX_INCLUDE_DIR}" ) + # remove prefix -I because we need the pure directory + IF(WX_INCLUDE_DIRS_WITH_PREFIX) + STRING(REGEX REPLACE "[-][I]" ";" WXWIDGETS_INCLUDE_DIR ${WX_INCLUDE_DIRS_WITH_PREFIX} ) + ENDIF(WX_INCLUDE_DIRS_WITH_PREFIX) + # replace space separated string by semicolon separated vector + SEPARATE_ARGUMENTS(WXWIDGETS_INCLUDE_DIR) + # Remove the -I options from the CXX_FLAGS no need to duplicate + STRING(REGEX REPLACE "[-][I]([^ ;])+" "" WXWIDGETS_CXX_FLAGS ${WXWIDGETS_CXX_FLAGS} ) + + # + # Find XWindows + # + IF( NOT CYGWIN OR MINGW ) + INCLUDE( ${CMAKE_ROOT}/Modules/FindX11.cmake ) + SET( WXWIDGETS_INCLUDE_DIR ${WXWIDGETS_INCLUDE_DIR} ${X11_INCLUDE_DIR} ) + ENDIF( NOT CYGWIN OR MINGW ) +ENDIF( WIN32_STYLE_FIND ) + +# +# Find library list (platform specific) +# +IF( WIN32_STYLE_FIND ) + # + #Misc vars used to build lib names + # + SET( PFLIBEXT ${CMAKE_STATIC_LIBRARY_SUFFIX} ) + SET( WXPF "${WXPF}${WXVERSIONSUFFIX}" ) + SET( PFVERSION ${WXVERSIONSUFFIX} ) + SET( PFCOMPILER "" ) + + # + # Build the libraries list + # + SET( WX_TOKEN_LIBS "" ) + SET( WX_MULTI_LIBRARIES "" ) + SET( WX_MONO_LIBRARIES "" ) + SET( WX_DEBUG_TOKEN "@1" ) + + #start filling library string with needed libraries for the choosen configuration. + #note we use tokens for debug/release and the debug suffix so we can replace later + SET( WXPF "${PFVERSION}${PFUNICODE}${WX_DEBUG_TOKEN}" ) + SET(WX_MULTI_LIBRARIES ${WX_MULTI_LIBRARIES} + wxbase${WXPF}${PFCOMPILER}${PFLIBEXT} + wxbase${WXPF}_net${PFCOMPILER}${PFLIBEXT} + wxbase${WXPF}_xml${PFCOMPILER}${PFLIBEXT} + ) + + SET( WXPF "${PFVERSION}${PFUNICODE}${WX_DEBUG_TOKEN}" ) + SET(WX_MULTI_LIBRARIES ${WX_MULTI_LIBRARIES} + wxmsw${WXPF}_adv${PFCOMPILER}${PFLIBEXT} + wxmsw${WXPF}_core${PFCOMPILER}${PFLIBEXT} + wxmsw${WXPF}_html${PFCOMPILER}${PFLIBEXT} + wxmsw${WXPF}_xrc${PFCOMPILER}${PFLIBEXT} + ) + IF (WXWIDGETS_USE_MEDIA) + SET(WX_MULTI_LIBRARIES ${WX_MULTI_LIBRARIES} + wxmsw${WXPF}_media${PFCOMPILER}${PFLIBEXT} + ) + ENDIF (WXWIDGETS_USE_MEDIA) + + IF( NOT WXWIDGETS_USE_SHARED ) + SET( WXPF "${PFVERSION}${PFUNICODE}${WX_DEBUG_TOKEN}" ) + IF (WXWIDGETS_USE_ODBC) + SET(WX_MULTI_LIBRARIES ${WX_MULTI_LIBRARIES} + wxbase${WXPF}_odbc${PFCOMPILER}${PFLIBEXT} + ) + ENDIF (WXWIDGETS_USE_ODBC) + + SET( WXPF "${PFVERSION}${PFUNICODE}${WX_DEBUG_TOKEN}" ) + IF (WXWIDGETS_USE_DBGRID) + SET(WX_MULTI_LIBRARIES ${WX_MULTI_LIBRARIES} + wxmsw${WXPF}_dbgrid${PFLIBEXT} + ) + ENDIF (WXWIDGETS_USE_DBGRID) + IF (WXWIDGETS_USE_GL) + SET(WX_MULTI_LIBRARIES ${WX_MULTI_LIBRARIES} + wxmsw${WXPF}_gl${PFCOMPILER}${PFLIBEXT} + ) + ENDIF (WXWIDGETS_USE_GL) + ENDIF( NOT WXWIDGETS_USE_SHARED ) + + IF ( WXWIDGETS_USE_UNIV ) + SET( WXPF "${PFUNIV}${PFVERSION}${PFUNICODE}${WX_DEBUG_TOKEN}" ) + SET(WX_MULTI_LIBRARIES ${WX_MULTI_LIBRARIES} + wxmsw${WXPF}_core${PFCOMPILER}${PFLIBEXT} + ) + ENDIF ( WXWIDGETS_USE_UNIV ) + + SET(WX_MONO_LIBRARIES ${WX_MONO_LIBRARIES} + wxmsw${WXPF}${PFCOMPILER}${PFLIBEXT} + ) + + IF ( WXWIDGETS_USE_MONO ) + SET(WX_TOKEN_LIBS ${WX_TOKEN_LIBS} ${WX_MONO_LIBRARIES}) + ELSE ( WXWIDGETS_USE_MONO ) + SET(WX_TOKEN_LIBS ${WX_TOKEN_LIBS} ${WX_MULTI_LIBRARIES}) + ENDIF ( WXWIDGETS_USE_MONO ) + + SET( WXPF "${PFUNICODE}${WX_DEBUG_TOKEN}" ) + SET(WX_TOKEN_LIBS ${WX_TOKEN_LIBS} + wxregex${WXPF}.lib + ) + + SET( WXPF "${WX_DEBUG_TOKEN}" ) + SET(WX_TOKEN_LIBS ${WX_TOKEN_LIBS} + wxexpat${WXPF}.lib + wxpng${WXPF}.lib + wxtiff${WXPF}.lib + wxjpeg${WXPF}.lib + wxzlib${WXPF}.lib + ) + + + SET( WXWIDGETS_COMMON_LIBRARIES + comctl32${PFLIBEXT} wsock32${PFLIBEXT} rpcrt4${PFLIBEXT} + ) + # + #Build release/debug lists by replacing tokens + # + SET( WXWIDGETS_RELEASE_LIBRARIES "" ) + FOREACH(LOOPLIB ${WX_TOKEN_LIBS}) + SET(WX_TMPLIB ${LOOPLIB}) + STRING(REGEX REPLACE "[@][1]" "" WX_TMPLIB ${WX_TMPLIB} ) + SET( WXWIDGETS_RELEASE_LIBRARIES ${WXWIDGETS_RELEASE_LIBRARIES} + ${WX_TMPLIB} + ) + ENDFOREACH(LOOPLIB ${WX_TOKEN_LIBS}) + SET( WXWIDGETS_DEBUG_LIBRARIES "" ) + FOREACH(LOOPLIB ${WX_TOKEN_LIBS}) + SET(WX_TMPLIB ${LOOPLIB}) + STRING(REGEX REPLACE "[@][1]" "d" WX_TMPLIB ${WX_TMPLIB} ) + SET( WXWIDGETS_DEBUG_LIBRARIES ${WXWIDGETS_DEBUG_LIBRARIES} + ${WX_TMPLIB} + ) + ENDFOREACH(LOOPLIB ${WX_TOKEN_LIBS}) + + # + # Set full lib list to requested type + # + IF( WXWIDGETS_USE_DEBUG ) + SET( WXWIDGETS_LIBRARIES ${WXWIDGETS_COMMON_LIBRARIES} + ${WXWIDGETS_DEBUG_LIBRARIES} + ) + ELSE( WXWIDGETS_USE_DEBUG ) + SET( WXWIDGETS_LIBRARIES ${WXWIDGETS_COMMON_LIBRARIES} + ${WXWIDGETS_RELEASE_LIBRARIES} + ) + ENDIF( WXWIDGETS_USE_DEBUG ) + + #Not used under Windows + SET( WXWIDGETS_EXE_LINKER_FLAGS "" ) + +ELSE( WIN32_STYLE_FIND ) + # + # Get Library list from wx-config + # + # do we need additionial wx GL stuff like GLCanvas ? + IF(WXWIDGETS_USE_GL) + SET(WX_CONFIG_ARGS_LIBS "${WX_CONFIG_ARGS_LIBS} --gl-libs" ) + ENDIF(WXWIDGETS_USE_GL) + + EXEC_PROGRAM(${WX_WXCONFIG_EXECUTABLE} + ARGS ${WX_CONFIG_ARGS_LIBS} + OUTPUT_VARIABLE WX_CONFIGARGS + RETURN_VALUE BAD_WXCONFIG ) + IF (BAD_WXCONFIG) + MESSAGE( SEND_ERROR "ERROR: Specified WXWidgets config NOT found") + ENDIF (BAD_WXCONFIG) + + #Pull lib dirs, linker opts, and libs from wx-config --libs return + SET(WXWIDGETS_LINK_DIRECTORIES "") + SET(WXWIDGETS_EXE_LINKER_FLAGS "") + SET(WXWIDGETS_LIBRARIES "") + SEPARATE_ARGUMENTS(WX_CONFIGARGS) + FILE( WRITE "${PROJECT_BINARY_DIR}/findwxw-args.log" "WXWIDGETS ARGS\n" ) + FOREACH(WXARG ${WX_CONFIGARGS}) + FILE( APPEND "${PROJECT_BINARY_DIR}/findwxw-args.log" "WXARG: ${WXARG}\n" ) + IF(WXARG MATCHES "^-L") + SET(WXWIDGETS_LINK_DIRECTORIES ${WXWIDGETS_LINK_DIRECTORIES} ${WXARG}) + ELSE(WXARG MATCHES "^-L") + IF(WXARG MATCHES "^-l") + SET(WXWIDGETS_LIBRARIES "${WXWIDGETS_LIBRARIES} ${WXARG}") + ELSE(WXARG MATCHES "^-l") + IF(WXARG MATCHES "^-") + SET(WXWIDGETS_EXE_LINKER_FLAGS "${WXWIDGETS_EXE_LINKER_FLAGS} ${WXARG}") + ELSE(WXARG MATCHES "^-") + SET(WXWIDGETS_LIBRARIES "${WXWIDGETS_LIBRARIES} ${WXARG}") + ENDIF(WXARG MATCHES "^-") + ENDIF(WXARG MATCHES "^-l") + ENDIF(WXARG MATCHES "^-L") + ENDFOREACH(WXARG ${WX_CONFIGARGS}) + + #Separate library names with ; + SEPARATE_ARGUMENTS(WXWIDGETS_LIBRARIES) + + # remove prefix -L because we need the pure directory for LINK_DIRECTORIES + # replace -L by ; because the separator seems to be lost otherwise (bug or + # feature?) + SET(WX_LINK_DIRECTORIES_WITH_PREFIX ${WXWIDGETS_LINK_DIRECTORIES}) + IF(WX_LINK_DIRECTORIES_WITH_PREFIX) + STRING(REGEX REPLACE "[-][L]" ";" WXWIDGETS_LINK_DIRECTORIES ${WX_LINK_DIRECTORIES_WITH_PREFIX} ) + #MESSAGE("DBG WXWIDGETS_LINK_DIRECTORIES=${WXWIDGETS_LINK_DIRECTORIES}") + ENDIF(WX_LINK_DIRECTORIES_WITH_PREFIX) + # replace space separated string by semicolon separated vector to make it + # work with LINK_DIRECTORIES + SEPARATE_ARGUMENTS(WXWIDGETS_LINK_DIRECTORIES) + + + # + # Unix puts all the libs in the WXWIDGETS_LIBRARIES var + # We don't know debug/release libs under unix, so we set the + # common var to full set as well and leave debug/release sets blank + # + SET( WXWIDGETS_RELEASE_LIBRARIES "" ) + SET( WXWIDGETS_DEBUG_LIBRARIES "" ) + SET(WXWIDGETS_COMMON_LIBRARIES ${WXWIDGETS_LIBRARIES}) + +ENDIF( WIN32_STYLE_FIND ) + + +# +# Find wx.rc +# +SET( WXWIDGETS_RC ${WXWIDGETS_ROOT_DIR}/include/wx/msw/wx.rc ) +IF( NOT WIN32_STYLE_FIND ) + IF( NOT CYGWIN OR MINGW ) + SET( WXWIDGETS_RC "" ) + ENDIF( NOT CYGWIN OR MINGW ) +ENDIF( NOT WIN32_STYLE_FIND ) + +# +# Set preprocessor defs +# +STRING(TOUPPER ${CMAKE_SYSTEM_NAME} WX_SYSNAME) +SET( WXWIDGETS_DEFINITIONS ${WXWIDGETS_DEFINITIONS} "-D${WX_SYSNAME}" ) + +IF(WIN32_STYLE_FIND) + SET( WXWIDGETS_DEFINITIONS ${WXWIDGETS_DEFINITIONS} -DWIN32 -D__WXMSW__ ) +ELSE(WIN32_STYLE_FIND) + IF( CYGWIN ) + SET( WXWIDGETS_DEFINITIONS ${WXWIDGETS_DEFINITIONS} -D__GNUWIN32__ -O2 -D_WIN32_IE=0x400 -MMD -Wall ) + ENDIF( CYGWIN ) +ENDIF(WIN32_STYLE_FIND) + +IF( WXWIDGETS_USE_SHARED ) + SET( WXWIDGETS_DEFINITIONS ${WXWIDGETS_DEFINITIONS} -DWXUSINGDLL ) +ENDIF( WXWIDGETS_USE_SHARED ) + +IF( WXWIDGETS_USE_DEBUG ) + SET( WXWIDGETS_DEFINITIONS ${WXWIDGETS_DEFINITIONS} -D_DEBUG_ -D__WXDEBUG__ -DWXDEBUG=1 ) +ENDIF( WXWIDGETS_USE_DEBUG ) + +IF ( WXWIDGETS_USE_UNICODE ) + SET( WXWIDGETS_DEFINITIONS ${WXWIDGETS_DEFINITIONS} -DwxUSE_UNICODE ) +ENDIF ( WXWIDGETS_USE_UNICODE ) + +# +# Set the WXWIDGETS_FOUND var +# +IF(WXWIDGETS_LIBRARIES AND WXWIDGETS_INCLUDE_DIR) + SET(WXWIDGETS_FOUND 1) +ENDIF(WXWIDGETS_LIBRARIES AND WXWIDGETS_INCLUDE_DIR) + +# +# Mark advanced vars +# +MARK_AS_ADVANCED(WXWIDGETS_ROOT_DIR) + +# +# Log results +# +FILE( WRITE "${PROJECT_BINARY_DIR}/findwxw.log" "FindwxW.cmake version 1.06\n" ) +FILE( APPEND "${PROJECT_BINARY_DIR}/findwxw.log" "WXWIDGETS_FOUND: ${WXWIDGETS_FOUND}\n" ) +FILE( APPEND "${PROJECT_BINARY_DIR}/findwxw.log" "WXWIDGETS_LINK_DIRECTORIES: ${WXWIDGETS_LINK_DIRECTORIES}\n" ) +FILE( APPEND "${PROJECT_BINARY_DIR}/findwxw.log" "WXWIDGETS_LIBRARIES: ${WXWIDGETS_LIBRARIES}\n" ) +FILE( APPEND "${PROJECT_BINARY_DIR}/findwxw.log" "WXWIDGETS_RELEASE_LIBRARIES: ${WXWIDGETS_RELEASE_LIBRARIES}\n" ) +FILE( APPEND "${PROJECT_BINARY_DIR}/findwxw.log" "WXWIDGETS_DEBUG_LIBRARIES: ${WXWIDGETS_DEBUG_LIBRARIES}\n" ) +FILE( APPEND "${PROJECT_BINARY_DIR}/findwxw.log" "WXWIDGETS_CXX_FLAGS: ${WXWIDGETS_CXX_FLAGS}\n" ) +FILE( APPEND "${PROJECT_BINARY_DIR}/findwxw.log" "WXWIDGETS_EXE_LINKER_FLAGS: ${WXWIDGETS_EXE_LINKER_FLAGS}\n" ) +FILE( APPEND "${PROJECT_BINARY_DIR}/findwxw.log" "WXWIDGETS_INCLUDE_DIR: ${WXWIDGETS_INCLUDE_DIR}\n" ) +FILE( APPEND "${PROJECT_BINARY_DIR}/findwxw.log" "WXWIDGETS_DEFINITIONS: ${WXWIDGETS_DEFINITIONS}\n" ) diff --git a/lib/maracasVisuLib/include/Modules/GDCMConfig.cmake b/lib/maracasVisuLib/include/Modules/GDCMConfig.cmake new file mode 100644 index 0000000..ed36f84 --- /dev/null +++ b/lib/maracasVisuLib/include/Modules/GDCMConfig.cmake @@ -0,0 +1,113 @@ +#----------------------------------------------------------------------------- +# +# GDCMConfig.cmake - CMake configuration file for external projects. +# +# This file is configured by GDCM and used by the UseGDCM.cmake +# module to load GDCM's settings for an external project. + +# Compute the installation prefix from GDCM_DIR. +SET(GDCM_INSTALL_PREFIX "${GDCM_DIR}") +GET_FILENAME_COMPONENT(GDCM_INSTALL_PREFIX "${GDCM_INSTALL_PREFIX}" PATH) +GET_FILENAME_COMPONENT(GDCM_INSTALL_PREFIX "${GDCM_INSTALL_PREFIX}" PATH) + +# The GDCM version number. +SET(GDCM_MAJOR_VERSION "1") +SET(GDCM_MINOR_VERSION "3") +SET(GDCM_BUILD_VERSION "1") +SET(GDCM_VERSION "1.3.1") + +# The libraries. +SET(GDCM_LIBRARIES "gdcm") + +# The list of available languages. +#SET(GDCM_LANGUAGES "Python") + +# The CMake macros dir. +SET(GDCM_CMAKE_DIR "${GDCM_INSTALL_PREFIX}/lib/gdcm/CMake") + +# The configuration options. +SET(GDCM_BUILD_SHARED_LIBS "") +#SET(GDCM_USE_HTML_HELP "") + +# The C and C++ flags added to the cmake-configured flags. +SET(GDCM_REQUIRED_C_FLAGS + "") +SET(GDCM_REQUIRED_CXX_FLAGS + "") +SET(GDCM_REQUIRED_EXE_LINKER_FLAGS + "") +SET(GDCM_REQUIRED_SHARED_LINKER_FLAGS + "") +SET(GDCM_REQUIRED_MODULE_LINKER_FLAGS + "") + +# The "use" file. +SET(GDCM_USE_FILE "${GDCM_INSTALL_PREFIX}/lib/gdcm/UseGDCM.cmake") + +# The build settings file. +SET(GDCM_BUILD_SETTINGS_FILE "${GDCM_INSTALL_PREFIX}/lib/gdcm/GDCMBuildSettings.cmake") + +# The library directories. +SET(GDCM_LIBRARY_DIRS "${GDCM_INSTALL_PREFIX}/lib/gdcm") + +# The runtime directories. +# Note that if GDCM_CONFIGURATION_TYPES is set (see below) then +# these directories will be the parent directories under which there will +# be a directory of runtime binaries for each configuration type. +SET(GDCM_RUNTIME_DIRS "${GDCM_INSTALL_PREFIX}/bin") + +# The include directories. +SET(GDCM_INCLUDE_DIRS "${GDCM_INSTALL_PREFIX}/include/gdcm") + +# The library dependencies file. +IF(NOT GDCM_NO_LIBRARY_DEPENDS) + INCLUDE("${GDCM_INSTALL_PREFIX}/lib/gdcm/GDCMLibraryDepends.cmake") +ENDIF(NOT GDCM_NO_LIBRARY_DEPENDS) + +# The data dir. +SET(GDCM_DATA_DIR "${GDCM_INSTALL_PREFIX}/share/gdcm/Data") + +# The examples dir. +SET(GDCM_EXAMPLES_DIR "${GDCM_INSTALL_PREFIX}/share/gdcm/Examples") + +# The resources dir. +SET(GDCM_RESOURCES_DIR "") +SET(GDCM_RESOURCE_MAJOR_VERSION + "") +SET(GDCM_RESOURCE_MINOR_VERSION + "") +SET(GDCM_RESOURCE_APPLICATION_NAME + "") +SET(GDCM_RESOURCE_FILE_NAME + "") +SET(GDCM_RESOURCE_COMPANY_NAME + "") + +# The Tcl/Tk options. +#SET(GDCM_TCL_PACKAGE_INDEX_DIR +# "") + +# The Python options. +SET(GDCM_PYTHON_MODULE_DIR + "") + +# The Doxygen options. +SET(GDCM_DOXYGEN_DIR "${GDCM_INSTALL_PREFIX}") + +# The VTK options. +SET(GDCM_VTK_DIR "C:/Creatis/VTKBin") + +# An install tree always provides one build configuration. +# A build tree may provide either one or multiple build +# configurations depending on the CMake generator used. Since +# this project can be used either from a build tree or an install tree it +# is useful for outside projects to know the configurations available. +# If this GDCMConfig.cmake is in an install tree +# GDCM_CONFIGURATION_TYPES will be empty and GDCM_BUILD_TYPE +# will be set to the value of CMAKE_BUILD_TYPE used to build +# GDCM. If GDCMConfig.cmake is in a build tree +# then GDCM_CONFIGURATION_TYPES and GDCM_BUILD_TYPE will +# have values matching CMAKE_CONFIGURATION_TYPES and CMAKE_BUILD_TYPE +# for that build tree (only one will ever be set). +SET(GDCM_CONFIGURATION_TYPES ) +SET(GDCM_BUILD_TYPE Release) diff --git a/lib/maracasVisuLib/include/Modules/MARACAS_Find_GDCM.cmake b/lib/maracasVisuLib/include/Modules/MARACAS_Find_GDCM.cmake new file mode 100644 index 0000000..f2fdb7d --- /dev/null +++ b/lib/maracasVisuLib/include/Modules/MARACAS_Find_GDCM.cmake @@ -0,0 +1,16 @@ +#Interface02Wx need gdcm +OPTION(GDCM "GDCM." ON ) +IF(GDCM) + FIND_PACKAGE(GDCM) +# 4 Juin 2007 +# INCLUDE_DIRECTORIES(${GDCM_INCLUDE_DIR}) + IF(GDCM_FOUND) + INCLUDE(${GDCM_USE_FILE}) + set(GDCM_LIBRARIES + ${GDCM_LIBRARIES} + " vtkgdcm" + ) + + ENDIF(GDCM_FOUND) + +ENDIF(GDCM) diff --git a/lib/maracasVisuLib/include/Modules/MARACAS_Find_ITK.cmake b/lib/maracasVisuLib/include/Modules/MARACAS_Find_ITK.cmake new file mode 100644 index 0000000..3d1d4c6 --- /dev/null +++ b/lib/maracasVisuLib/include/Modules/MARACAS_Find_ITK.cmake @@ -0,0 +1,71 @@ +#----------------------------------------------------------------------------- +OPTION(USE_ITK "Build ITK-based " ON) +IF(USE_ITK) + # Search ITK + FIND_PACKAGE(ITK) + # If itk found + IF(ITK_FOUND) + INCLUDE(${ITK_USE_FILE}) +# ADD_DEF( _USE_ITK_ ) + SET(MARACAS_ITK_LIBRARIES + ${MARACAS_ITK_LIBRARIES} + ITKCommon + ITKBasicFilters + ITKIO + ITKNumerics + ITKAlgorithms + # itkvnl + ) + MARK_AS_ADVANCED(ITK_DIR) + + # images compilation option + OPTION ( itk_IMAGE_DIM_2 "itk : Compile 2D images" ON) + OPTION ( itk_IMAGE_DIM_3 "itk : Compile 3D images" ON) + OPTION ( itk_IMAGE_TYPE_UCHAR "itk : Compile unsigned char images" ON) + OPTION ( itk_IMAGE_TYPE_SHORT "itk : Compile short images" ON) + OPTION ( itk_IMAGE_TYPE_USHORT "itk : Compile unsigned short images" ON) + OPTION ( itk_IMAGE_TYPE_INT "itk : Compile int images" ON) + OPTION ( itk_IMAGE_TYPE_FLOAT "itk : Compile float images" ON) + +# IF ( itk_IMAGE_DIM_2 ) +# ADD_DEF( BBTK_ITK_IMAGE_DIM_2 ) +# ENDIF ( itk_IMAGE_DIM_2 ) + +# IF ( itk_IMAGE_DIM_3 ) +# ADD_DEF( BBTK_ITK_IMAGE_DIM_3 ) +# ENDIF ( itk_IMAGE_DIM_3 ) + +# IF ( itk_IMAGE_TYPE_UCHAR ) +# ADD_DEF( BBTK_ITK_IMAGE_TYPE_UCHAR ) +# ENDIF ( itk_IMAGE_TYPE_UCHAR ) + +# IF ( itk_IMAGE_TYPE_SHORT ) +# ADD_DEF( BBTK_ITK_IMAGE_TYPE_SHORT ) +# ENDIF ( itk_IMAGE_TYPE_SHORT ) + +# IF ( itk_IMAGE_TYPE_USHORT ) +# ADD_DEF( BBTK_ITK_IMAGE_TYPE_USHORT ) +# ENDIF ( itk_IMAGE_TYPE_USHORT ) + +# IF ( itk_IMAGE_TYPE_INT ) +# ADD_DEF( BBTK_ITK_IMAGE_TYPE_INT ) +# ENDIF ( itk_IMAGE_TYPE_INT ) + +# IF ( itk_IMAGE_TYPE_FLOAT ) +# ADD_DEF( BBTK_ITK_IMAGE_TYPE_FLOAT ) +# ENDIF ( itk_IMAGE_TYPE_FLOAT ) + + + ELSE(ITK_FOUND) + MESSAGE(FATAL_ERROR + "Cannot build MARACAS without ITK. Please set ITK_DIR.") + ENDIF(ITK_FOUND) + + + + + + +ENDIF(USE_ITK) +MARK_AS_ADVANCED(USE_ITK) +#----------------------------------------------------------------------------- diff --git a/lib/maracasVisuLib/include/Modules/MARACAS_Find_LIBIDO.cmake b/lib/maracasVisuLib/include/Modules/MARACAS_Find_LIBIDO.cmake new file mode 100644 index 0000000..4ffc57e --- /dev/null +++ b/lib/maracasVisuLib/include/Modules/MARACAS_Find_LIBIDO.cmake @@ -0,0 +1,4 @@ + +FIND_PATH( libIdo_DIR libidobin $ENV{LIBIDO_PATH} ) +FIND_PACKAGE(libIdo) +INCLUDE_DIRECTORIES(${LIBIDO_INCLUDE_PATH}) \ No newline at end of file diff --git a/lib/maracasVisuLib/include/Modules/MARACAS_Find_VTK.cmake b/lib/maracasVisuLib/include/Modules/MARACAS_Find_VTK.cmake new file mode 100644 index 0000000..0cf3c62 --- /dev/null +++ b/lib/maracasVisuLib/include/Modules/MARACAS_Find_VTK.cmake @@ -0,0 +1,16 @@ +FIND_PATH( VTK_DIR vtkbin $ENV{VTK_PATH} ) + +FIND_PACKAGE(VTK) +IF(VTK_FOUND) + INCLUDE(${VTK_USE_FILE}) + INCLUDE_DIRECTORIES(${VTK_INCLUDE_DIRS}) + set ( maracas_VTK_LIBRARIES + vtkCommon vtkFiltering vtkGraphics vtkIO vtkImaging + vtkRendering vtkHybrid vtkWidgets vtkVolumeRendering + ) + +ELSE(VTK_FOUND) + MESSAGE(FATAL_ERROR + "Cannot build MARACAS without VTK. Please set VTK_DIR.") +ENDIF(VTK_FOUND) + diff --git a/lib/maracasVisuLib/include/Modules/MARACAS_Find_WXWIDGETS.cmake b/lib/maracasVisuLib/include/Modules/MARACAS_Find_WXWIDGETS.cmake new file mode 100644 index 0000000..9ab329a --- /dev/null +++ b/lib/maracasVisuLib/include/Modules/MARACAS_Find_WXWIDGETS.cmake @@ -0,0 +1,51 @@ + + +IF(WIN32) + + # WXWINDOWS_LIBRARY = full path to the wxWindows library and linker flags on unix + # CMAKE_WX_CXX_FLAGS = compiler flags for building wxWindows + # WXWINDOWS_INCLUDE_PATH = include path of wxWindows + SET(WXWINDOWS_USE_GL 1) #wxWidgets build related stuff + SET(WXW_USE_DEBUG ON ) + SET(WXW_USE_UNICODE OFF ) + SET(WXW_USE_SHARED ON ) + SET(WXW_USE_UNIV OFF ) + SET(WXW_USE_MONO OFF ) + SET(WXW_FILE_VERSION "28" ) + SET(WXW_VERSION "2.8" ) + + #CMake Options + SET(CMAKE_VERBOSE_MAKEFILE TRUE) + + INCLUDE (FindwxW) + # + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}${WXWIDGETS_CXX_FLAGS}") + SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}${WXWIDGETS_EXE_LINKER_FLAGS}") + ADD_DEFINITIONS( ${WXWIDGETS_DEFINITIONS} ) + # + INCLUDE_DIRECTORIES(${WXWIDGETS_INCLUDE_DIR}) + LINK_DIRECTORIES( ${WXWIDGETS_LINK_DIRECTORIES} ) + SET(maracas_WXWIDGETS_LIBRARIES + ${WXWIDGETS_LIBRARIES} + wxmsw28d_aui + ) + + +ENDIF(WIN32) +IF(UNIX) + # GTK2 + FIND_PACKAGE(GTK2) + INCLUDE_DIRECTORIES(${GTK2_INCLUDE_DIRS}) + LINK_DIRECTORIES(${GTK2_LIBRARY_DIRS}) +# LINK_LIBRARIES(${GTK2_LIBRARIES}) + # WX + SET(wxWidgets_USE_LIBS base core gl) + FIND_PACKAGE( wxWidgets REQUIRED) + INCLUDE( ${wxWidgets_USE_FILE} ) + SET(maracas_WXWIDGETS_LIBRARIES + ${wxWidgets_LIBRARIES} + ${GTK2_LIBRARIES} + ) + +ENDIF(UNIX) + diff --git a/lib/maracasVisuLib/include/Modules/UseGDCM.cmake b/lib/maracasVisuLib/include/Modules/UseGDCM.cmake new file mode 100644 index 0000000..c673e9c --- /dev/null +++ b/lib/maracasVisuLib/include/Modules/UseGDCM.cmake @@ -0,0 +1,51 @@ +# +# This module is provided as GDCM_USE_FILE by GDCMConfig.cmake. +# It can be INCLUDEd in a project to load the needed compiler and linker +# settings to use GDCM: +# FIND_PACKAGE(GDCM REQUIRED) +# INCLUDE(${GDCM_USE_FILE}) +# + +IF(NOT GDCM_USE_FILE_INCLUDED) + SET(GDCM_USE_FILE_INCLUDED 1) + + # Load the compiler settings used for GDCM. + IF(GDCM_BUILD_SETTINGS_FILE) + INCLUDE(${CMAKE_ROOT}/Modules/CMakeImportBuildSettings.cmake) + CMAKE_IMPORT_BUILD_SETTINGS(${GDCM_BUILD_SETTINGS_FILE}) + ENDIF(GDCM_BUILD_SETTINGS_FILE) + + # Add compiler flags needed to use GDCM. + SET(CMAKE_C_FLAGS + "${CMAKE_C_FLAGS} ${GDCM_REQUIRED_C_FLAGS}") + SET(CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS} ${GDCM_REQUIRED_CXX_FLAGS}") + SET(CMAKE_EXE_LINKER_FLAGS + "${CMAKE_EXE_LINKER_FLAGS} ${GDCM_REQUIRED_EXE_LINKER_FLAGS}") + SET(CMAKE_SHARED_LINKER_FLAGS + "${CMAKE_SHARED_LINKER_FLAGS} ${GDCM_REQUIRED_SHARED_LINKER_FLAGS}") + SET(CMAKE_MODULE_LINKER_FLAGS + "${CMAKE_MODULE_LINKER_FLAGS} ${GDCM_REQUIRED_MODULE_LINKER_FLAGS}") + + # Add include directories needed to use GDCM. + INCLUDE_DIRECTORIES( BEFORE ${GDCM_INCLUDE_DIRS}) + + # Add link directories needed to use GDCM. + LINK_DIRECTORIES(${GDCM_LIBRARY_DIRS}) + + # Add cmake module path. + SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${GDCM_CMAKE_DIR}") + + # Use VTK. + IF(GDCM_VTK) + SET(VTK_DIR ${GDCM_VTK_DIR}) + FIND_PACKAGE(VTK) + IF(VTK_FOUND) + INCLUDE(${VTK_USE_FILE}) + set(GDCM_LIBRARIES ${GDCM_LIBRARIES} " vtkgdcm" ) + ELSE(VTK_FOUND) + MESSAGE("VTK not found in GDCM_VTK_DIR=\"${GDCM_VTK_DIR}\".") + ENDIF(VTK_FOUND) + ENDIF(GDCM_VTK) + +ENDIF(NOT GDCM_USE_FILE_INCLUDED) diff --git a/lib/maracasVisuLib/include/mathdefs.h b/lib/maracasVisuLib/include/mathdefs.h new file mode 100644 index 0000000..47c9f5f --- /dev/null +++ b/lib/maracasVisuLib/include/mathdefs.h @@ -0,0 +1,70 @@ +//////////////////////////////////////////////////////////////////////////////// +// matrix.h +// Creation : 20/01/2000 +// Author : Leonardo FLOREZ VALENCIA +// l-florez@uniandes.edu.co +// lflorez@creatis.insa-lyon.fr +// Copyright (C) 2000-2002 Leonardo FLOREZ VALENCIA +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +//////////////////////////////////////////////////////////////////////////////// + +#ifndef GTMLIB__MATH__MATHDEFS__HXX +#define GTMLIB__MATH__MATHDEFS__HXX + +#include + +/// PI constant. +#define GTM_PI 3.14159265359 +/// 2 * PI constant. +#define GTM_PI2 6.28318530717 +/// ln1 constant. +#define GTM_NE 2.71828182846 + +/// Minimum. +#define GTM_MIN( a, b ) ( ( ( a ) < ( b ) )? ( a ): ( b ) ) +/// Maximum. +#define GTM_MAX( a, b ) ( ( ( a ) > ( b ) )? ( a ): ( b ) ) +#define GTM_POW2( a ) ( ( a ) * ( a ) ) + +// Useful typedefs. +typedef unsigned char uchar; +typedef unsigned short ushort; +typedef unsigned int uint; + +namespace gtm +{ + + /** Rounds a double number. + * + * @param n Number. + */ + inline + double round( double n ) + { + double tmp; + tmp = floor( n ); + if ( ( n - tmp ) < 0.5 ) + return( tmp ); + else + return( ceil( n ) ); + + } + +} + +#endif // GTMLIB__MATH__MATHDEFS__HXX + +// EOF - mathdefs.h diff --git a/lib/maracasVisuLib/include/matrix.h b/lib/maracasVisuLib/include/matrix.h new file mode 100644 index 0000000..9689f59 --- /dev/null +++ b/lib/maracasVisuLib/include/matrix.h @@ -0,0 +1,431 @@ +//////////////////////////////////////////////////////////////////////////////// +// matrix.h +// Creation : 19/03/2000 +// Author : Leonardo FLOREZ VALENCIA +// l-florez@uniandes.edu.co +// lflorez@creatis.insa-lyon.fr +// Copyright (C) 2000-2002 Leonardo FLOREZ VALENCIA +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +//////////////////////////////////////////////////////////////////////////////// + +#ifndef GTMLIB__MATH__MATRIX__HXX +#define GTMLIB__MATH__MATRIX__HXX + +#include "mathdefs.h" +#include "vmfuncs.h" +#include "vector.h" + +namespace gtm +{ + /** TMatrix class. + * + * This class defines a C++ template to use mathematical matrices of NxM. + * @see TVector + */ + template< class T > + class TMatrix + { + public: + + /** Constructors. + * + * @param N Columns. + * @param M Rows. + * @param data Initial data. + * @param r Copy object (matrix or vector). + * @param block Memory block. + */ + //@{ + /// Default constructor. + TMatrix( uint N = 3, uint M = 3, T data = ( T )0 ); + /// Copy constructor. + TMatrix( const TMatrix< T >& r ); + /// ANSI casting constructor. + TMatrix( T** block, uint N, uint M ); + //@} + + /// Destructor. + ~TMatrix( ) { + MatrixFreeMemory< T >( _matrix, _N ); + }; + + /** Assignation operators. + * + * @param r Right object (matrix, vector or scalar). + */ + //@{ + /// Natural assignation. + TMatrix< T >& operator=( const TMatrix< T >& r ); + /// Vector assignation. + TMatrix< T >& operator=( TVector< T >& r ); + /// Scalar assignation. + TMatrix< T >& operator=( T r ); + //@} + + /** Comparation operators. + * + * @param Right matrix. + */ + //@{ + /// Equality. + bool operator==( const TMatrix< T >& r ); + /// Inequality. + bool operator!=( const TMatrix< T >& r ); + //@} + + /// Reference operator. + T& operator()( uint i, uint j ) { + return( _matrix[ i ][ j ] ); + }; + /// Columns + uint GetN( ) { + return( _N ); + }; + /// Rows + uint GetM( ) { + return( _M ); + }; + /// Returns the ANSI (C/C++) reference. + T** GetAnsiRef( ) { + return( _matrix ); + }; + /// Determinant. + T Det( ) { + return( MatrixDeterminant< T >( _matrix, _N ) ); + }; + /// Loads identity. + void LoadIdentity( ) { + MatrixLoadIdentity< T >( _matrix, GTM_MIN( _N, _M ) ); + }; + + /** Binary operators. + * + * @param r Right objet (matrix, vector or scalar). + */ + //@{ + /// Addition. + TMatrix< T > operator+( const TMatrix< T >& r ); + /// Substraction. + TMatrix< T > operator-( const TMatrix< T >& r ); + /// Product. + TMatrix< T > operator*( const TMatrix< T >& r ); + /// Product (vector). + TMatrix< T > operator*( TVector< T >& r ); + /// Scalar product + TMatrix< T > operator*( T r ); + //@} + + /** Self-assignation binary operators. + * + * @param r Right object (matrix, vector or scalar). + */ + //@{ + /// Addition. + TMatrix< T >& operator+=( const TMatrix< T >& r ) { + *this = *this + r; + return( *this ); + }; + /// Substraction. + TMatrix< T >& operator-=( const TMatrix< T >& r ) { + *this = *this - r; + return( *this ); + }; + /// Product. + TMatrix< T >& operator*=( const TMatrix< T >& r ) { + *this = *this * r; + return( *this ); + }; + /// Product (vector). + TMatrix< T >& operator*=( TVector< T >& r ) { + *this = *this * r; + return( *this ); + }; + /// Scalar product. + TMatrix< T >& operator*=( T r ) { + *this = *this * r; + return( *this ); + }; + //@} + + /** Unary operators. + */ + //@{ + /// Additive inverse. + TMatrix< T > operator-( ); + /// Matrix inverse. + TMatrix< T > operator!( ); + /// Matrix transpose. + TMatrix< T > operator~( ); + //@} + + private: + + /// Matrix' internal state. + //@{ + /// Memory block. + T** _matrix; + /// Columns. + uint _N; + /// Rows. + uint _M; + //@} + + }; + +// ----------------------------------------------------------------------------- + template< class T > + TVector< T >& TVector< T >::operator=( TMatrix< T >& r ) + { + uint i, j, k, min; + + // This min calc. avoids to reserve temporary memory, so, be careful. + min = GTM_MIN( r.GetN( ) * r.GetM( ), _N ); + _type = ( r.GetN( ) == 1 )? COL_VECTOR: ROW_VECTOR; + for( i = 0, k = 0; i < r.GetN( ) && k < min; i++ ) + for( j = 0; j < r.GetM( ) && k < min; _vector[ k++ ] = r( i, j ), j++ ); + return( *this ); + + } + +// ----------------------------------------------------------------------------- + template< class T > + TMatrix< T > TVector< T >::operator*( TMatrix< T >& r ) + { + TMatrix< T > m = *this; + return( m * r ); + + } + +// ----------------------------------------------------------------------------- + template< class T > + TMatrix< T >::TMatrix( uint N, uint M, T data ) + { + _N = N; + _M = M; + _matrix = MatrixAllocateMemory< T >( _N, _M ); + MatrixAssignScalar< T >( _matrix, data, _N, _M ); + + } + +// ----------------------------------------------------------------------------- + template< class T > + TMatrix< T >::TMatrix( const TMatrix< T >& r ) + { + _N = r._N; + _M = r._M; + _matrix = MatrixCopyMemory< T >( r._matrix, _N, _M ); + + } + +// ----------------------------------------------------------------------------- + template< class T > + TMatrix< T >::TMatrix( T** block, uint N, uint M ) + { + _N = N; + _M = M; + _matrix = MatrixCopyMemory< T >( block, N, M ); + + } + +// ----------------------------------------------------------------------------- + template< class T > + TMatrix< T >& TMatrix< T >::operator=( const TMatrix< T >& r ) + { + if( _N != r._N || _M != r._M ) { + + MatrixFreeMemory< T >( _matrix, _N ); + _N = r._N; + _M = r._M; + _matrix = MatrixCopyMemory< T >( r._matrix, _N, _M ); + + } else MatrixAssignMemory< T >( _matrix, r._matrix, _N, _M ); + return( *this ); + + } + +// ----------------------------------------------------------------------------- + template< class T > + TMatrix< T >& TMatrix< T >::operator=( TVector< T >& r ) + { + uint i; + uint n = r.GetN( ); + bool column = ( r.GetType( ) == COL_VECTOR ); + + MatrixFreeMemory< T >( _matrix, _N ); + _N = ( column )? 1: n; + _M = ( column )? n: 1; + _matrix = MatrixAllocateMemory< T >( _N, _M ); + for( i = 0; i < n; _matrix[ ( column )? 0: i ][ ( column )? i: 0 ] = r( i ), i++ ); + return( *this ); + + } + +// ----------------------------------------------------------------------------- + template< class T > + TMatrix< T >& TMatrix< T >::operator=( T r ) + { + MatrixAssignScalar< T >( _matrix, r, _N, _M ); + return( *this ); + + } + +// ----------------------------------------------------------------------------- + template< class T > + bool TMatrix< T >::operator==( const TMatrix< T >& r ) + { + uint i, j; + bool ret; + + for( + i = 0, ret = ( _N == r._N && _M == r._M ); + i < _N && ret; + i++ + ) for( + j = 0; + j < _M && ret; + ret &= ( _matrix[ i ][ j ] == r._matrix[ i ][ j ] ), j++ + ); + return( ret ); + + } + +// ----------------------------------------------------------------------------- + template< class T > + bool TMatrix< T >::operator!=( const TMatrix< T >& r ) + { + uint i, j; + bool ret; + + for( + i = 0, ret = ( _N != r._N || _M != r._M ); + i < _N && !ret; + i++ + ) for( + j = 0; + j < _M && !ret; + ret |= ( _matrix[ i ][ j ] != r._matrix[ i ][ j ] ), j++ + ); + return( ret ); + + } + +// ----------------------------------------------------------------------------- + template< class T > + TMatrix< T > TMatrix< T >::operator+( const TMatrix< T >& r ) + { + TMatrix< T > ret( _N, _M ); + + MatrixAdd< T >( + ret._matrix, + _matrix, + r._matrix, + GTM_MIN( _N, r._N ), + GTM_MIN( _M, r._M ) + ); + return( ret ); + + } + +// ----------------------------------------------------------------------------- + template< class T > + TMatrix< T > TMatrix< T >::operator-( const TMatrix< T >& r ) + { + TMatrix< T > ret( _N, _M ); + + MatrixSubtract< T >( + ret._matrix, + _matrix, + r._matrix, + GTM_MIN( _N, r._N ), + GTM_MIN( _M, r._M ) + ); + return( ret ); + + } + +// ----------------------------------------------------------------------------- + template< class T > + TMatrix< T > TMatrix< T >::operator*( const TMatrix< T >& r ) + { + TMatrix< T > ret( r._N, _M ); + + MatrixProduct< T >( ret._matrix, _matrix, r._matrix, _N, _M, r._N ); + return( ret ); + + } + +// ----------------------------------------------------------------------------- + template< class T > + TMatrix< T > TMatrix< T >::operator*( T r ) + { + TMatrix< T > ret( _N, _M ); + + MatrixScalarProduct< T >( ret._matrix, _matrix, r, _N, _M ); + return( ret ); + + } + +// ----------------------------------------------------------------------------- + template< class T > + TMatrix< T > TMatrix< T >::operator*( TVector< T >& r ) + { + TMatrix< T > m; + m = r; + return( *this * m ); + + } + +// ----------------------------------------------------------------------------- + template< class T > + TMatrix< T > TMatrix< T >::operator-( ) + { + TMatrix< T > ret( _N, _M ); + uint i, j; + + for( i = 0; i < _N; i++ ) + for( j = 0; j < _M; ret._matrix[ i ][ j ] = ( T )0 - _matrix[ i ][ j ], j++ ); + return( ret ); + + } + +// ----------------------------------------------------------------------------- + template< class T > + TMatrix< T > TMatrix< T >::operator!( ) + { + TMatrix< T > ret( _N, _N ); + + if( _N <= 4 ) MatrixInverseAdjoint< T >( ret._matrix, _matrix, _N ); + else MatrixInverseGauss< T >( ret._matrix, _matrix, _N ); + return( ret ); + + } + +// ----------------------------------------------------------------------------- + template< class T > + TMatrix< T > TMatrix< T >::operator~( ) + { + TMatrix< T > ret( _M, _N ); + + MatrixTranspose< T >( ret._matrix, _matrix, _N, _M ); + return( ret ); + + } + +} // namespace + +#endif // GTMLIB__MATH__MATRIX__HXX + +// EOF - matrix.h diff --git a/lib/maracasVisuLib/include/vector.h b/lib/maracasVisuLib/include/vector.h new file mode 100644 index 0000000..edadd11 --- /dev/null +++ b/lib/maracasVisuLib/include/vector.h @@ -0,0 +1,382 @@ +//////////////////////////////////////////////////////////////////////////////// +// vector.h +// Creation : 24/02/2000 +// Author : Leonardo FLOREZ VALENCIA +// l-florez@uniandes.edu.co +// lflorez@creatis.insa-lyon.fr +// Copyright (C) 2000-2002 Leonardo FLOREZ VALENCIA +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +//////////////////////////////////////////////////////////////////////////////// + +#ifndef GTMLIB__MATH__VECTOR__HXX +#define GTMLIB__MATH__VECTOR__HXX + +#include "mathdefs.h" +#include "vmfuncs.h" + +/// Vector type IDs +//@{ +#define ROW_VECTOR 0x01 +#define COL_VECTOR 0x02 +//@} + +namespace gtm +{ + template< class T > + class TMatrix; + + /** TVector class. + * + * This class defines a C++ template to use mathematical vectors + * in a N space. + * @see TMatrix + */ + template< class T > + class TVector + { + public: + + /** Contructors. + * + * @param N Cardinality. + * @param data Initial data. + * @param type Vector type (ROW_VECTOR/COL_VECTOR). + * @param r Right object (vector or matrix). + * @param block ANSI array. + * @param copy Make a copy of given array? + */ + //@{ + /// Default constructor. + TVector( uint N = 3, T data = ( T )0, int type = COL_VECTOR ); + /// Copy constructor. + TVector( const TVector< T >& r ); + /// Use this to treat an ANSI array as a TVector. + TVector( T* block, uint N, bool copy = true, int type = COL_VECTOR ); + //@} + + /// Destructor. + ~TVector( ) { + if( _myMemory ) VectorFreeMemory< T >( _vector ); + }; + + /// Size change + void SetN( uint N ); + + /** Assignation operators. + * + * @param r Right object (vector or matrix). + */ + //@{ + /// Vector assignation. + TVector< T >& operator=( const TVector< T >& r ); + /// Matrix assignation (defined in class TMatrix). + TVector< T >& operator=( TMatrix< T >& r ); + /// ANSI assignation (r size must be, at least, N). + TVector< T >& operator=( T* r ) { + VectorAssignMemory< T >( _vector, r, _N ); + return( *this ); + }; + /// Scalar assignation. + TVector< T >& operator=( T r ) { + VectorAssignScalar< T >( _vector, r, _N ); + return( *this ); + }; + //@} + + /** Comparation operators. + * + * @param r Right object. + */ + //@{ + /// Equality. + bool operator==( const TVector< T >& r ); + /// Inequality. + bool operator!=( const TVector< T >& r ); + //@} + + /// Reference operator. + T& operator()( uint i ) { + return( _vector[ i ] ); + }; + /// ANSI (C/C++ array) reference. + T* GetAnsiRef( ) { + return( _vector ); + }; + /// Vector's cardinality. + uint GetN( ) { + return( _N ); + }; + /// Vector's type (ROW_VECTOR/COL_VECTOR). + int GetType( ) { + return( _type ); + }; + /// Mathematical norm (L2). + T GetNorm( ) { + return( VectorNorm< T >( _vector, _N ) ); + }; + /// Normalizes the vector. + void Normalize( ) { + VectorNormalize< T >( _vector, _vector, _N ); + }; + /// Dot product. + T Dot( const TVector< T >& r ) { + return( VectorDotProduct< T >( _vector, r._vector, GTM_MIN( _N, r._N ) ) ); + }; + + /** Binary operators. + * + * @param r Right object (vector, matrix or scalar). + */ + //@{ + /// Addition. + TVector< T > operator+( const TVector< T >& r ); + /// Substraction. + TVector< T > operator-( const TVector< T >& r ); + /// Cross product. + TVector< T > operator*( const TVector< T >& r ); + /// Matrix product (defined in class TMatrix). + TMatrix< T > operator*( TMatrix< T >& r ); + /// Scalar product. + TVector< T > operator*( T r ); + //@} + + /** Self-assignation binary operators. + * + * @param r Right object (vector, matrix or scalar). + */ + //@{ + /// Addition. + TVector< T >& operator+=( const TVector< T >& r ) { + *this = *this + r; + return( *this ); + }; + /// Substraction. + TVector< T >& operator-=( const TVector< T >& r ) { + *this = *this - r; + return( *this ); + }; + /// Cross product. + TVector< T >& operator*=( const TVector< T >& r ) { + *this = *this * r; + return( *this ); + }; + /// Scalar product. + TVector< T >& operator*=( T r ) { + *this = *this * r; + return( *this ); + }; + //@} + + /// Unary operators. + //@{ + /// Additive inverse. + TVector< T > operator-( ); + /// Normalized vector. + TVector< T > operator!( ); + /// Transposed vector. + TVector< T > operator~( ); + //@} + + private: + + /// Vector's internal state. + //@{ + /// Memory block. + T* _vector; + /// Cardinality. + uint _N; + /// Type (ROW_VECTOR/COL_VECTOR). + int _type; + /// Have I created _vector? + bool _myMemory; + //@} + + }; + +// ----------------------------------------------------------------------------- + template< class T > + TVector< T >::TVector( uint N, T data, int type ) + { + _N = N; + _type = type; + _vector = VectorAllocateMemory< T >( _N ); + _myMemory = true; + VectorAssignScalar< T >( _vector, data, _N ); + + } + +// ----------------------------------------------------------------------------- + template< class T > + TVector< T >::TVector( const TVector< T >& r ) + { + _N = r._N; + _type = r._type; + _myMemory = true; + _vector = VectorCopyMemory< T >( r._vector, _N ); + + } + +// ----------------------------------------------------------------------------- + template< class T > + TVector< T >::TVector( T* block, uint N, bool copy, int type ) + { + _N = N; + _type = type; + _myMemory = copy; + _vector = ( copy )? VectorCopyMemory< T >( block, _N ): block; + + } + +// ----------------------------------------------------------------------------- + template< class T > + void TVector< T >::SetN( uint N ) + { + if( _myMemory ) VectorFreeMemory< T >( _vector ); + _N = N; + _vector = VectorAllocateMemory< T >( _N ); + _myMemory = true; + VectorAssignScalar< T >( _vector, ( T )0, _N ); + + } + +// ----------------------------------------------------------------------------- + template< class T > + TVector< T >& TVector< T >::operator=( const TVector< T >& r ) + { + /* + * Only assigns the minimum cardinality (WARNING WITH NON-LOCAL MEMORY). + */ + _type = r._type; + VectorAssignMemory< T >( _vector, r._vector, GTM_MIN( _N, r._N ) ); + return( *this ); + + } + +// ----------------------------------------------------------------------------- + template< class T > + bool TVector< T >::operator==( const TVector< T >& r ) + { + uint i; + bool ret; + + for( + i = 0, ret = ( _N == r._N ); + i < _N && ret; + ret &= ( _vector[ i ] == r._vector[ i ] ), i++ + ); + return( ret ); + + } + +// ----------------------------------------------------------------------------- + template< class T > + bool TVector< T >::operator!=( const TVector< T >& r ) + { + uint i; + bool ret; + + for( + i = 0, ret = ( _N != r._N ); + i < _N && !ret; + ret |= ( _vector[ i ] != r._vector[ i ] ), i++ + ); + return( ret ); + + } + +// ----------------------------------------------------------------------------- + template< class T > + TVector< T > TVector< T >::operator+( const TVector< T >& r ) + { + TVector< T > ret( GTM_MIN( _N, r._N ) ); + + VectorAdd< T >( ret._vector, _vector, r._vector, GTM_MIN( _N, r._N ) ); + return( ret ); + + } + +// ----------------------------------------------------------------------------- + template< class T > + TVector< T > TVector< T >::operator-( const TVector< T >& r ) + { + TVector< T > ret( GTM_MIN( _N, r._N ) ); + + VectorSubtract< T >( ret._vector, _vector, r._vector, GTM_MIN( _N, r._N ) ); + return( ret ); + + } + +// ----------------------------------------------------------------------------- + template< class T > + TVector< T > TVector< T >::operator*( const TVector< T >& r ) + { + TVector< T > ret( GTM_MIN( _N, r._N ) ); + + VectorCrossProduct< T >( ret._vector, _vector, r._vector ); + return( ret ); + + } + +// ----------------------------------------------------------------------------- + template< class T > + TVector< T > TVector< T >::operator*( T r ) + { + TVector< T > ret( _N ); + + VectorScalarProduct< T >( ret._vector, _vector, r, _N ); + return( ret ); + + } + +// ----------------------------------------------------------------------------- + template< class T > + TVector< T > TVector< T >::operator-( ) + { + TVector< T > ret( _N ); + uint i; + + for( i = 0; i < _N; ret._vector[ i ] = ( T )0 - _vector[ i ], i++ ); + return( ret ); + + } + +// ----------------------------------------------------------------------------- + template< class T > + TVector< T > TVector< T >::operator!( ) + { + TVector< T > ret( _N ); + + VectorNormalize< T >( ret._vector, _vector, _N ); + return( ret ); + + } + +// ----------------------------------------------------------------------------- + template< class T > + TVector< T > TVector< T >::operator~( ) + { + TVector< T > ret = *this; + + ret._type = ( _type == COL_VECTOR )? ROW_VECTOR: COL_VECTOR; + return( ret ); + + } + +} // namespace + +#endif // GTMLIB__MATH__VECTOR__HXX + +// EOF - vector.h diff --git a/lib/maracasVisuLib/include/vmfuncs.h b/lib/maracasVisuLib/include/vmfuncs.h new file mode 100644 index 0000000..976cd2c --- /dev/null +++ b/lib/maracasVisuLib/include/vmfuncs.h @@ -0,0 +1,733 @@ +//////////////////////////////////////////////////////////////////////////////// +// vmfuncs.h +// Creation : 02/02/2000 +// Author : Leonardo FLOREZ VALENCIA +// l-florez@uniandes.edu.co +// lflorez@creatis.insa-lyon.fr +// Copyright (C) 2000-2002 Leonardo FLOREZ VALENCIA +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +//////////////////////////////////////////////////////////////////////////////// + +#ifndef GTMLIB__MATH__VMFUNCS__HXX +#define GTMLIB__MATH__VMFUNCS__HXX + +#include +#include +#include +#include "mathdefs.h" + +using namespace std; + +namespace gtm +{ +// ----------------------------------------------------------------------------- +// +/// Functions for vectors. +//@{ +// ----------------------------------------------------------------------------- + /** Stream out function for vectors. + * + * @param o Output stream. + * @param v ANSI array. + * @param n Cardinality. + * @param col Should I print it in column format? + */ + template< class T > + inline + void VectorPrint( std::ostream& o, T* v, uint n, bool col ) + { + uint i; + + o << n << ": ["; + if( col ) o << endl; + else o << " "; + for( uint i = 0; i < n; i++ ) { + + o << v[ i ]; + if( col ) o << endl; + else o << " "; + + } // rof + o << "]" << endl; + + } + +// ----------------------------------------------------------------------------- + /** Allocation function. + * + * @param n Cardinality. + */ + template< class T > + inline + T* VectorAllocateMemory( uint n ) + { + T* v = new T[ n ]; + + memset( v, 0, sizeof( T ) * n ); + return( v ); + + } + +// ----------------------------------------------------------------------------- + /** Frees vector's memory. + * + * @param v Vector. + */ + template< class T > + inline + void VectorFreeMemory( T* v ) + { + if( v ) delete [] v; + + } + +// ----------------------------------------------------------------------------- + /** Copy. + * + * @param v Target vector. + * @param v_o Source vector. + * @param n Cardinality. + */ + template< class T > + inline + void VectorAssignMemory( T* v, T* v_o, uint n ) + { + memcpy( v, v_o, sizeof( T ) * n ); + + } + +// ----------------------------------------------------------------------------- + /** Allocation & copy. + * + * @param v Vector to be copied. + * @param n Cardinality. + */ + template< class T > + inline + T* VectorCopyMemory( T* v, uint n ) + { + T* n_v = VectorAllocateMemory< T >( n ); + VectorAssignMemory< T >( n_v, v, n ); + return( n_v ); + + } + +// ----------------------------------------------------------------------------- + /** Scalar assignation. + * + * @param v Vector. + * @param s Scalar value. + * @param n Cardinality. + */ + template< class T > + inline + void VectorAssignScalar( T* v, T s, uint n ) + { + uint i; + + for( i = 0; i < n; v[ i ] = s, i++ ); + + } + +// ----------------------------------------------------------------------------- + /** Convert a vector in a matrix. + * + * @param ma Matrix. + * @param v Vector. + * @param n Columns. + * @param m Rows. + * @param col Is it a column vector? + */ + template< class T > + inline + void VectorMatrixCast( T** ma, T* v, uint n, uint m, bool col ) + { + uint i; + + for( i = 0; i < ( ( col )? m: n ); i++ ) + ma[ ( col )? n: i ][ ( col )? i: m ] = v[ i ]; + + } + +// ----------------------------------------------------------------------------- + /** Performs a vectorial addition. + * + * @param v Result. + * @param v_l Left operand. + * @param v_r Right operand. + * @param n Cardinality. + */ + template< class T > + inline + void VectorAdd( T* v, T* v_l, T* v_r, uint n ) + { + uint i; + + for( i = 0; i < n; v[ i ] = v_l[ i ] + v_r[ i ], i++ ); + + } + +// ----------------------------------------------------------------------------- + /** Performs a vectorial substraction. + * + * @param v Result. + * @param v_l Left operand. + * @param v_r Right operand. + * @param n Cardinality. + */ + template< class T > + inline + void VectorSubtract( T* v, T* v_l, T* v_r, uint n ) + { + uint i; + + for( i = 0; i < n; v[ i ] = v_l[ i ] - v_r[ i ], i++ ); + + } + +// ----------------------------------------------------------------------------- + /** Performs a vectorial cross product. + * + * @param v Result. + * @param v_l Left operand. + * @param v_r Right operand. + */ + template< class T > + inline + void VectorCrossProduct( T* v, T* v_l, T* v_r ) + { + v[ 0 ] = ( v_l[ 1 ] * v_r[ 2 ] ) - ( v_l[ 2 ] * v_r[ 1 ] ); + v[ 1 ] = ( v_l[ 2 ] * v_r[ 0 ] ) - ( v_l[ 0 ] * v_r[ 2 ] ); + v[ 2 ] = ( v_l[ 0 ] * v_r[ 1 ] ) - ( v_l[ 1 ] * v_r[ 0 ] ); + + } + +// ----------------------------------------------------------------------------- + /** Performs a vectorial dot product. + * + * @param v_l Left operand. + * @param v_r Right operand. + * @param n Cardinality. + * @return Dot product. + */ + template< class T > + inline + T VectorDotProduct( T* v_l, T* v_r, uint n ) + { + T ret; + uint i; + + for( i = 0, ret = ( T )0; i < n; ret = ret + ( v_l[ i ] * v_r[ i ] ), i++ ); + return( ret ); + + } + +// ----------------------------------------------------------------------------- + /** Performs a vector-scalar product. + * + * @param v Result. + * @param v_l Left operand. + * @param s Scalar. + * @param n Cardinality. + */ + template< class T > + inline + void VectorScalarProduct( T* v, T* v_l, T s, uint n ) + { + uint i; + + for( i = 0; i < n; v[ i ] = v_l[ i ] * s, i++ ); + + } + +// ----------------------------------------------------------------------------- + /** Calculates vectorial L2 norm. + * + * @param v Vector. + * @param n Cardinality. + */ + template< class T > + inline + T VectorNorm( T* v, uint n ) + { + return( ( T )( sqrt( ( double )( VectorDotProduct< T >( v, v, n ) ) ) ) ); + + } + +// ----------------------------------------------------------------------------- + /** Calculates a normal vector, usign the L2 norm. + * + * @param v Result. + * @param v_o Original vector. + * @param n Cardinality. + */ + template< class T > + inline + void VectorNormalize( T* v, T* v_o, uint n ) + { + uint i; + T norm = VectorNorm< T >( v_o, n ); + + norm = ( norm == ( T )0 )? ( T )1: norm; + for( i = 0; i < n; v[ i ] = v_o[ i ] / norm, i++ ); + + } + +// ----------------------------------------------------------------------------- +//@} +/// Functions for matrices. +//@{ +// ----------------------------------------------------------------------------- + /** Stream out function for matrices. + * + * @param o Output stream. + * @param ma Matrix. + * @param n Columns. + * @param m Rows. + */ + template< class T > + inline + void MatrixPrint( std::ostream& o, T** ma, uint n, uint m ) + { + uint i, j; + + o << n << " x " << m << endl; + for( j = 0; j < m; j++ ) { + + for( i = 0; i < n; o << ma[ i ][ j ] << " ", i++ ); + o << endl; + + } // rof + + } + +// ----------------------------------------------------------------------------- + /** Allocates memory for a matrix. + * + * @param n Columns. + * @param m Rows. + */ + template< class T > + inline + T** MatrixAllocateMemory( uint n, uint m ) + { + uint i; + T** ma = new T*[ n ]; + + for( i = 0; i < n; i++ ) { + + ma[ i ] = new T[ m ]; + memset( ma[ i ], 0, sizeof( T ) * m ); + + } // rof + return( ma ); + + } + +// ----------------------------------------------------------------------------- + /** Copies. + * + * @param ma Target matrix. + * @param ma_o Source matrix. + * @param n Columns. + * @param m Rows. + */ + template< class T > + inline + void MatrixAssignMemory( T** ma, T** ma_o, uint n, uint m ) + { + uint i; + + for( i = 0; i < n; i++ ) + memcpy( ma[ i ], ma_o[ i ], sizeof( T ) * m ); + + } + +// ----------------------------------------------------------------------------- + /** Allocates & copies. + * + * @param ma Matrix. + * @param n Columns. + * @param m Rows. + */ + template< class T > + inline + T** MatrixCopyMemory( T** ma, uint n, uint m ) + { + T** n_ma = MatrixAllocateMemory< T >( n, m ); + MatrixAssignMemory< T >( n_ma, ma, n, m ); + return( n_ma ); + + } + +// ----------------------------------------------------------------------------- + /** Scalar assignation. + * + * @param ma Matrix. + * @param s Scalar. + * @param n Columns. + * @param m Rows. + */ + template< class T > + inline + void MatrixAssignScalar( T** ma, T s, uint n, uint m ) + { + uint i, j; + + for( i = 0; i < n; i++ ) + for( j = 0; j < m; j++ ) + ma[ i ][ j ] = s; + + } + +// ----------------------------------------------------------------------------- + /** Converts a matrix in a vector. + * + * @param v Vector. + * @param ma Matrix. + * @param n Columns. + * @param m Rows. + * @param col Convert to a column vector? + */ + template< class T > + inline + void MatrixVectorCast( T* v, T** ma, uint n, uint m, bool col ) + { + uint i; + + for( i = 0; i < ( ( col )? m: n ); i++ ) + v[ i ] = ma[ ( col )? n: i ][ ( col )? i: m ]; + + } + +// ----------------------------------------------------------------------------- + /** Frees matrix memory. + * + * @param ma Matrix. + * @param n Columns. + */ + template< class T > + inline + void MatrixFreeMemory( T** ma, uint n ) + { + uint i; + + if( ma ) { + + for( i = 0; i < n; i++ ) + if( ma[ i ] ) delete [] ma[ i ]; + delete [] ma; + + } // fi + + } + +// ----------------------------------------------------------------------------- + /** Performs a matricial addition. + * + * @param ma Result. + * @param ma_l Left operand. + * @param ma_r Right operand. + * @param n Columns. + * @param m Rows. + */ + template< class T > + inline + void MatrixAdd( T** ma, T** ma_l, T** ma_r, uint n, uint m ) + { + uint i, j; + + for( i = 0; i < n; i++ ) + for( j = 0; j < m; ma[ i ][ j ] = ma_l[ i ][ j ] + ma_r[ i ][ j ], j++ ); + + } + +// ----------------------------------------------------------------------------- + /** Performs a matricial substraction. + * + * @param ma Result. + * @param ma_l Left operand. + * @param ma_r Right operand. + * @param n Columns. + * @param m Rows. + */ + template< class T > + inline + void MatrixSubtract( T** ma, T** ma_l, T** ma_r, uint n, uint m ) + { + uint i, j; + + for( i = 0; i < n; i++ ) + for( j = 0; j < m; ma[ i ][ j ] = ma_l[ i ][ j ] - ma_r[ i ][ j ], j++ ); + + } + +// ----------------------------------------------------------------------------- + /** Performs a matricial product. + * + * @param ma Result. + * @param ma_l Left operand. + * @param ma_r Right operand. + * @param n Left columns. + * @param m Left rows/right columns. + * @param nr Right columns. + */ + template< class T > + inline + void MatrixProduct( T** ma, T** ma_l, T** ma_r, uint n, uint m, uint nr ) + { + unsigned i, j, k; + + for( i = 0; i < nr; i++ ) + for( j = 0; j < m; j++ ) + for( + k = 0, ma[ i ][ j ] = ( T )0; + k < n; + ma[ i ][ j ] = ma[ i ][ j ] + ( ma_l[ k ][ j ] * ma_r[ i ][ k ] ), k++ + ); + + } + +// ----------------------------------------------------------------------------- + /** Performs a scalar-matrix product. + * + * @param ma Result. + * @param ma_l Left operand. + * @param s Scalar. + * @param n Columns. + * @param m Rows. + */ + template< class T > + inline + void MatrixScalarProduct( T** ma, T** ma_l, T s, uint n, uint m ) + { + uint i, j; + + for( i = 0; i < n; i++ ) + for( j = 0; j < m; ma[ i ][ j ] = ma_l[ i ][ j ] * s, j++ ); + + } + +// ----------------------------------------------------------------------------- + /** Gets the matrix cofactor. + * + * @param ma Result. + * @param ma_o Matrix. + * @param i Column index. + * @param j Row index. + * @param n Columns. + * @param m Rows. + */ + template< class T > + inline + void MatrixCofactor( T** ma, T** ma_o, uint i, uint j, uint n, uint m ) + { + uint k, l; + + for( k = 0; k < i; k++ ) { + + for( l = 0; l < j; l++ ) ma[ k ][ l ] = ma_o[ k ][ l ]; + for( l = j + 1; l < m; l++ ) ma[ k ][ l - 1 ] = ma_o[ k ][ l ]; + + } // rof + + for( k = i + 1; k < n; k++ ) { + + for( l = 0; l < j; l++ ) ma[ k - 1 ][ l ] = ma_o[ k ][ l ]; + for( l = j + 1; l < m; l++ ) ma[ k - 1 ][ l - 1 ] = ma_o[ k ][ l ]; + + } // rof + + } + +// ----------------------------------------------------------------------------- + /** Gets the matrix determinant (square matrices only). + * + * @param ma Matrix. + * @param n Dimension. + */ + template< class T > + inline + T MatrixDeterminant( T** ma, uint n ) + { + uint k; + T** tmp = NULL; + T ret = ( T )0, c; + + // All these cases are for speed-up calculations. + if( n == 1 ) { + + ret = ma[ 0 ][ 0 ]; + + } else if( n == 2 ) { + + ret = + ( ma[ 0 ][ 0 ] * ma[ 1 ][ 1 ] ) - + ( ma[ 1 ][ 0 ] * ma[ 0 ][ 1 ] ); + + } else if( n == 3 ) { + + ret = + ( ma[ 0 ][ 0 ] * ma[ 1 ][ 1 ] * ma[ 2 ][ 2 ] ) - + ( ma[ 0 ][ 0 ] * ma[ 2 ][ 1 ] * ma[ 1 ][ 2 ] ) - + ( ma[ 1 ][ 0 ] * ma[ 0 ][ 1 ] * ma[ 2 ][ 2 ] ) + + ( ma[ 1 ][ 0 ] * ma[ 2 ][ 1 ] * ma[ 0 ][ 2 ] ) + + ( ma[ 2 ][ 0 ] * ma[ 0 ][ 1 ] * ma[ 1 ][ 2 ] ) - + ( ma[ 2 ][ 0 ] * ma[ 1 ][ 1 ] * ma[ 0 ][ 2 ] ); + + } else { + + tmp = MatrixAllocateMemory< T >( n - 1, n - 1 ); + for( k = 0, c = ( T )1, ret = ( T )0; k < n; k++ ) { + + MatrixCofactor< T >( tmp, ma, k, 0, n, n ); + ret = ret + ( c * ( ma[ k ][ 0 ] * MatrixDeterminant< T >( tmp, n - 1 ) ) ); + c = c * ( T )( 0 - 1 ); + + } // rof + MatrixFreeMemory< T >( tmp, n - 1 ); + + } // fi + return( ret ); + + } + +// ----------------------------------------------------------------------------- + /** Calculates the inverse using the adjoint method (only square matrices). + * + * @param ma Result. + * @param ma_o Matrix. + * @param n Dimension. + */ + template< class T > + inline + void MatrixInverseAdjoint( T** ma, T** ma_o, uint n ) + { + uint i, j; + T** tmp; + T c; + + tmp = MatrixAllocateMemory< T >( n - 1, n - 1 ); + for( i = 0; i < n; i++ ) { + + for( j = 0; j < n; j++ ) { + + c = ( ( i + j ) % 2 == 0 )? ( T )1: ( T )( 0 - 1 ); + MatrixCofactor< T >( tmp, ma_o, i, j, n, n ); + ma[ j ][ i ] = c * MatrixDeterminant< T >( tmp, n - 1 ); + + } // rof + + } // rof + MatrixFreeMemory< T >( tmp, n - 1 ); + + c = ( T )1 / MatrixDeterminant< T >( ma_o, n ); + MatrixScalarProduct< T >( ma, ma, c, n, n ); + + } + +// ----------------------------------------------------------------------------- + /** Calculates the inverse using the gauss method (only square matrices). + * + * @param ma Result. + * @param ma_o Matrix. + * @param n Dimension. + * @warning Adapted from a java-implementation: http://www.nauticom.net/www/jdtaft/JavaMatrix.htm + */ + template< class T > + inline + void MatrixInverseGauss( T** ma, T** ma_o, uint n ) + { + uint i, j, k, n2 = 2 * n; + T** ma_a = MatrixAllocateMemory< T >( n2, n ); + T a, b; + + // Augmented matrix initialization + for( i = 0; i < n; i++ ) + for( j = 0; j < n; ma_a[ i ][ j ] = ma_o[ i ][ j ], j++ ); + for( i = n; i < n2; i++ ) + for( j = 0; j < n; ma_a[ i ][ j ] = ( i - n == j )? ( T )1: ( T )0, j++ ); + + // Reduction + for( j = 0; j < n; j++ ) { + + a = ma_a[ j ][ j ]; + if( a != 0 ) for( i = 0; i < n2; ma_a[ i ][ j ] = ma_a[ i ][ j ] / a, i++ ); + for( k = 0; k < n; k++ ) { + + if( ( k - j ) != 0 ) { + + b = ma_a[ j ][ k ]; + for( + i = 0; + i < n2; + ma_a[ i ][ k ] = ma_a[ i ][ k ] - ( b * ma_a[ i ][ j ] ), i++ + ); + + } // fi + + } // rof + + } // rof + + // Result assignation + MatrixAssignMemory< T >( ma, ma_a, n, n ); + MatrixFreeMemory< T >( ma_a, n2 ); + + } + +// ----------------------------------------------------------------------------- + /** Gets the transpose matrix. + * + * @param ma Matrix result. + * @param ma_o Matrix. + * @param n Columns. + * @param m Rows. + */ + template< class T > + inline + void MatrixTranspose( T** ma, T** ma_o, uint n, uint m ) + { + uint i, j; + + for( i = 0; i < m; i++ ) + for( j = 0; j < n; ma[ i ][ j ] = ma_o[ j ][ i ], j++ ); + + } + +// ----------------------------------------------------------------------------- + /** Load a square matrix with the identity. + * + * @param ma Matrix. + * @param n Dimension. + */ + template< class T > + inline + void MatrixLoadIdentity( T** ma, uint n ) + { + uint i, j; + + for( i = 0; i < n; i++ ) + for( j = 0; j < n; ma[ i ][ j ] = ( i == j )? ( T )1: ( T )0, j++ ); + + } + +} +//@} + +#endif // GTMLIB__MATH__VMFUNCS__HXX + +// EOF - vmfuncs.h diff --git a/lib/maracasVisuLib/src/CMakeLists.txt b/lib/maracasVisuLib/src/CMakeLists.txt new file mode 100644 index 0000000..d3ac9a1 --- /dev/null +++ b/lib/maracasVisuLib/src/CMakeLists.txt @@ -0,0 +1,5 @@ +SUBDIRS( +#SnakeIsoContour+Deriche +#kernel +#interface +) diff --git a/lib/maracasVisuLib/src/CMakeListsWorking.txt b/lib/maracasVisuLib/src/CMakeListsWorking.txt new file mode 100644 index 0000000..9e8488a --- /dev/null +++ b/lib/maracasVisuLib/src/CMakeListsWorking.txt @@ -0,0 +1,5 @@ +SUBDIRS( +SnakeIsoContour+Deriche +kernel +interface +) diff --git a/lib/maracasVisuLib/src/interface/CMakeLists.txt b/lib/maracasVisuLib/src/interface/CMakeLists.txt new file mode 100644 index 0000000..be0a96d --- /dev/null +++ b/lib/maracasVisuLib/src/interface/CMakeLists.txt @@ -0,0 +1 @@ +SUBDIRS(wxWindows) diff --git a/lib/maracasVisuLib/src/interface/tcl/Makefile.am b/lib/maracasVisuLib/src/interface/tcl/Makefile.am new file mode 100644 index 0000000..4e7d439 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/tcl/Makefile.am @@ -0,0 +1,43 @@ +## Makefile.am -- Process this file with automake to produce Makefile.in + +SUBDIRS = tkwidgets to_change windows + +lib_LTLIBRARIES = libmarTcl.la + +INCLUDES = \ + $(VTK_CFLAGS) $(IDO_CFLAGS) \ + $(WX_CFLAGS) $(GSL_CFLAGS) $(KGFO_CFLAGS) \ + -I$(TCL_INC_DIR) -I$(TK_INC_DIR) \ + -I../include +libmarTcl_la_SOURCES = marTclInterface.h wrap_maracas.cxx +libmarTcl_la_LDFLAGS = \ + -version-info $(MARACAS_TCL_VER) \ + $(VTK_LIBS) -lvtkCommonTCL \ + $(IDO_LIBS) $(WX_LIBS) \ + $(TCLTK_LIBS) \ + $(GSL_LIBS) $(KGFO_LIBS) + +libmarTcl_la_LIBADD = ../kernel/libmarKernel.la + +EXTRA_DIST = tclexe.dsp \ + wrap_maracas.i \ + maracas_start.tcl \ + general.tcl \ + string_table.tcl + +# Special compilation commands +wrap_maracas.cxx: wrap_maracas.i + swig -tcl8 -c++ -o wrap_maracas.cxx wrap_maracas.i + +# Special targets +maracas.tcl : + echo "#!/usr/bin/wish" > maracas.tcl + echo "" >> maracas.tcl + echo "load $(libdir)/libmarTcl.so maracas" >> maracas.tcl + echo "source ./maracas_start.tcl" >> maracas.tcl + echo "" >> maracas.tcl + echo "# eof - maracas.tcl" >> maracas.tcl + echo "" >> maracas.tcl + chmod +x maracas.tcl + +## eof - Makefile.am \ No newline at end of file diff --git a/lib/maracasVisuLib/src/interface/tcl/Makefile.in b/lib/maracasVisuLib/src/interface/tcl/Makefile.in new file mode 100644 index 0000000..a8f0538 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/tcl/Makefile.in @@ -0,0 +1,517 @@ +# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am + +# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + +SHELL = @SHELL@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ +oldincludedir = /usr/include + +DESTDIR = + +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ + +top_builddir = .. + +ACLOCAL = @ACLOCAL@ +AUTOCONF = @AUTOCONF@ +AUTOMAKE = @AUTOMAKE@ +AUTOHEADER = @AUTOHEADER@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +transform = @program_transform_name@ + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +host_alias = @host_alias@ +host_triplet = @host@ +AS = @AS@ +CC = @CC@ +CFLAGS_DEBUG = @CFLAGS_DEBUG@ +CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@ +CFLAGS_WARNING = @CFLAGS_WARNING@ +CPP = @CPP@ +CXX = @CXX@ +DLLTOOL = @DLLTOOL@ +DL_LIBS = @DL_LIBS@ +ECHO = @ECHO@ +EXEEXT = @EXEEXT@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_CONFIG = @GSL_CONFIG@ +GSL_LIBS = @GSL_LIBS@ +IDO_CFLAGS = @IDO_CFLAGS@ +IDO_LIBS = @IDO_LIBS@ +KGFO_CFLAGS = @KGFO_CFLAGS@ +KGFO_CONFIG = @KGFO_CONFIG@ +KGFO_LIBS = @KGFO_LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +MAKEINFO = @MAKEINFO@ +MARACAS_ALGORITHM_VER = @MARACAS_ALGORITHM_VER@ +MARACAS_ALGORITHM_VER_STR = @MARACAS_ALGORITHM_VER_STR@ +MARACAS_KERNEL_VER = @MARACAS_KERNEL_VER@ +MARACAS_KERNEL_VER_STR = @MARACAS_KERNEL_VER_STR@ +MARACAS_TCL_VER = @MARACAS_TCL_VER@ +MARACAS_TCL_VER_STR = @MARACAS_TCL_VER_STR@ +MARACAS_VER = @MARACAS_VER@ +MARACAS_VER_STR = @MARACAS_VER_STR@ +MATH_LIBS = @MATH_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +RANLIB = @RANLIB@ +STRIP = @STRIP@ +TCLTK_LIBS = @TCLTK_LIBS@ +TCL_BIN_DIR = @TCL_BIN_DIR@ +TCL_INC_DIR = @TCL_INC_DIR@ +TCL_LIBS = @TCL_LIBS@ +TCL_LIB_FILE = @TCL_LIB_FILE@ +TCL_SRC_DIR = @TCL_SRC_DIR@ +TK_BIN_DIR = @TK_BIN_DIR@ +TK_INC_DIR = @TK_INC_DIR@ +TK_LIB_FILE = @TK_LIB_FILE@ +TK_SRC_DIR = @TK_SRC_DIR@ +VERSION = @VERSION@ +VTK_CFLAGS = @VTK_CFLAGS@ +VTK_LIBS = @VTK_LIBS@ +WX_CFLAGS = @WX_CFLAGS@ +WX_CONFIG = @WX_CONFIG@ +WX_LIBS = @WX_LIBS@ + +SUBDIRS = tkwidgets to_change windows + +lib_LTLIBRARIES = libmarTcl.la + +INCLUDES = $(VTK_CFLAGS) $(IDO_CFLAGS) $(WX_CFLAGS) $(GSL_CFLAGS) $(KGFO_CFLAGS) -I$(TCL_INC_DIR) -I$(TK_INC_DIR) -I../include + +libmarTcl_la_SOURCES = marTclInterface.h wrap_maracas.cxx +libmarTcl_la_LDFLAGS = -version-info $(MARACAS_TCL_VER) $(VTK_LIBS) -lvtkCommonTCL $(IDO_LIBS) $(WX_LIBS) $(TCLTK_LIBS) $(GSL_LIBS) $(KGFO_LIBS) + + +libmarTcl_la_LIBADD = ../kernel/libmarKernel.la + +EXTRA_DIST = tclexe.dsp wrap_maracas.i maracas_start.tcl general.tcl string_table.tcl + +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = ../config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(lib_LTLIBRARIES) + + +DEFS = @DEFS@ -I. -I$(srcdir) -I.. +CPPFLAGS = @CPPFLAGS@ +LDFLAGS = @LDFLAGS@ +LIBS = @LIBS@ +libmarTcl_la_DEPENDENCIES = ../kernel/libmarKernel.la +libmarTcl_la_OBJECTS = wrap_maracas.lo +CXXFLAGS = @CXXFLAGS@ +CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ +CFLAGS = @CFLAGS@ +COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ +DIST_COMMON = Makefile.am Makefile.in + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = tar +GZIP_ENV = --best +DEP_FILES = .deps/wrap_maracas.P +SOURCES = $(libmarTcl_la_SOURCES) +OBJECTS = $(libmarTcl_la_OBJECTS) + +all: all-redirect +.SUFFIXES: +.SUFFIXES: .S .c .cxx .lo .o .obj .s +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu tcl/Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + + +mostlyclean-libLTLIBRARIES: + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + +distclean-libLTLIBRARIES: + +maintainer-clean-libLTLIBRARIES: + +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(libdir) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \ + $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \ + else :; fi; \ + done + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ + done + +# FIXME: We should only use cygpath when building on Windows, +# and only if it is available. +.c.obj: + $(COMPILE) -c `cygpath -w $<` + +.s.o: + $(COMPILE) -c $< + +.S.o: + $(COMPILE) -c $< + +mostlyclean-compile: + -rm -f *.o core *.core + -rm -f *.$(OBJEXT) + +clean-compile: + +distclean-compile: + -rm -f *.tab.c + +maintainer-clean-compile: + +.s.lo: + $(LIBTOOL) --mode=compile $(COMPILE) -c $< + +.S.lo: + $(LIBTOOL) --mode=compile $(COMPILE) -c $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + +maintainer-clean-libtool: + +libmarTcl.la: $(libmarTcl_la_OBJECTS) $(libmarTcl_la_DEPENDENCIES) + $(CXXLINK) -rpath $(libdir) $(libmarTcl_la_LDFLAGS) $(libmarTcl_la_OBJECTS) $(libmarTcl_la_LIBADD) $(LIBS) +.cxx.o: + $(CXXCOMPILE) -c $< +.cxx.obj: + $(CXXCOMPILE) -c `cygpath -w $<` +.cxx.lo: + $(LTCXXCOMPILE) -c $< + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. + +@SET_MAKE@ + +all-recursive install-data-recursive install-exec-recursive \ +installdirs-recursive install-recursive uninstall-recursive \ +check-recursive installcheck-recursive info-recursive dvi-recursive: + @set fnord $(MAKEFLAGS); amf=$$2; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @set fnord $(MAKEFLAGS); amf=$$2; \ + dot_seen=no; \ + rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ + rev="$$subdir $$rev"; \ + test "$$subdir" = "." && dot_seen=yes; \ + done; \ + test "$$dot_seen" = "no" && rev=". $$rev"; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done + +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + here=`pwd` && cd $(srcdir) \ + && mkid -f$$here/ID $$unique $(LISP) + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ + || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) + +mostlyclean-tags: + +clean-tags: + +distclean-tags: + -rm -f TAGS ID + +maintainer-clean-tags: + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) + +subdir = tcl + +distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu tcl/Makefile + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ + cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done + for subdir in $(SUBDIRS); do \ + if test "$$subdir" = .; then :; else \ + test -d $(distdir)/$$subdir \ + || mkdir $(distdir)/$$subdir \ + || exit 1; \ + chmod 777 $(distdir)/$$subdir; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(top_distdir) distdir=../$(distdir)/$$subdir distdir) \ + || exit 1; \ + fi; \ + done + +DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :) + +-include $(DEP_FILES) + +mostlyclean-depend: + +clean-depend: + +distclean-depend: + -rm -rf .deps + +maintainer-clean-depend: + +%.o: %.c + @echo '$(COMPILE) -c $<'; \ + $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-cp .deps/$(*F).pp .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm .deps/$(*F).pp + +%.lo: %.c + @echo '$(LTCOMPILE) -c $<'; \ + $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ + < .deps/$(*F).pp > .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm -f .deps/$(*F).pp + +%.o: %.cxx + @echo '$(CXXCOMPILE) -c $<'; \ + $(CXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-cp .deps/$(*F).pp .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm .deps/$(*F).pp + +%.lo: %.cxx + @echo '$(LTCXXCOMPILE) -c $<'; \ + $(LTCXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ + < .deps/$(*F).pp > .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm -f .deps/$(*F).pp +info-am: +info: info-recursive +dvi-am: +dvi: dvi-recursive +check-am: all-am +check: check-recursive +installcheck-am: +installcheck: installcheck-recursive +install-exec-am: install-libLTLIBRARIES +install-exec: install-exec-recursive + +install-data-am: +install-data: install-data-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-recursive +uninstall-am: uninstall-libLTLIBRARIES +uninstall: uninstall-recursive +all-am: Makefile $(LTLIBRARIES) +all-redirect: all-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: installdirs-recursive +installdirs-am: + $(mkinstalldirs) $(DESTDIR)$(libdir) + + +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + +maintainer-clean-generic: +mostlyclean-am: mostlyclean-libLTLIBRARIES mostlyclean-compile \ + mostlyclean-libtool mostlyclean-tags mostlyclean-depend \ + mostlyclean-generic + +mostlyclean: mostlyclean-recursive + +clean-am: clean-libLTLIBRARIES clean-compile clean-libtool clean-tags \ + clean-depend clean-generic mostlyclean-am + +clean: clean-recursive + +distclean-am: distclean-libLTLIBRARIES distclean-compile \ + distclean-libtool distclean-tags distclean-depend \ + distclean-generic clean-am + -rm -f libtool + +distclean: distclean-recursive + +maintainer-clean-am: maintainer-clean-libLTLIBRARIES \ + maintainer-clean-compile maintainer-clean-libtool \ + maintainer-clean-tags maintainer-clean-depend \ + maintainer-clean-generic distclean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +maintainer-clean: maintainer-clean-recursive + +.PHONY: mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \ +clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \ +uninstall-libLTLIBRARIES install-libLTLIBRARIES mostlyclean-compile \ +distclean-compile clean-compile maintainer-clean-compile \ +mostlyclean-libtool distclean-libtool clean-libtool \ +maintainer-clean-libtool install-data-recursive \ +uninstall-data-recursive install-exec-recursive \ +uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \ +all-recursive check-recursive installcheck-recursive info-recursive \ +dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \ +maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ +distclean-tags clean-tags maintainer-clean-tags distdir \ +mostlyclean-depend distclean-depend clean-depend \ +maintainer-clean-depend info-am info dvi-am dvi check check-am \ +installcheck-am installcheck install-exec-am install-exec \ +install-data-am install-data install-am install uninstall-am uninstall \ +all-redirect all-am all installdirs-am installdirs mostlyclean-generic \ +distclean-generic clean-generic maintainer-clean-generic clean \ +mostlyclean distclean maintainer-clean + + +# Special compilation commands +wrap_maracas.cxx: wrap_maracas.i + swig -tcl8 -c++ -o wrap_maracas.cxx wrap_maracas.i + +# Special targets +maracas.tcl : + echo "#!/usr/bin/wish" > maracas.tcl + echo "" >> maracas.tcl + echo "load $(libdir)/libmarTcl.so maracas" >> maracas.tcl + echo "source ./maracas_start.tcl" >> maracas.tcl + echo "" >> maracas.tcl + echo "# eof - maracas.tcl" >> maracas.tcl + echo "" >> maracas.tcl + chmod +x maracas.tcl + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/maracasVisuLib/src/interface/tcl/general.tcl b/lib/maracasVisuLib/src/interface/tcl/general.tcl new file mode 100644 index 0000000..7c6c1c4 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/tcl/general.tcl @@ -0,0 +1,135 @@ +proc swig_cast { pointer newType } { + + set pt [ split $pointer "_"] + return "_[ lindex $pt 1 ]_$newType" + +} + +proc DistPoints { x1 y1 z1 x2 y2 z2 } { + + set carre [ expr ( ( $x2 - $x1 ) * ( $x2 - $x1 ) ) + ( ( $y2 - $y1 ) * ( $y2 - $y1 ) ) + ( ( $z2 - $z1 ) * ( $z2 - $z1 ) ) ] + set carre [ expr sqrt( $carre ) ] + return $carre + +} + +proc VoxelCoord { xPto yPto zPto xOrig yOrig zOrig dimXVoxel dimYVoxel dimZVoxel } { + + set d [ expr $xPto - $xOrig ] + set d [ expr $d + 0.0 ] + set floatLoc [ expr $d / $dimXVoxel ] + set xVoxel [ expr round( $floatLoc ) ] + + set d [ expr $yPto - $yOrig ] + set d [ expr $d + 0.0 ] + set floatLoc [ expr $d / $dimYVoxel ] + set yVoxel [ expr round( $floatLoc ) ] + + set d [ expr $zPto - $zOrig ] + set d [ expr $d + 0.0 ] + set floatLoc [ expr $d / $dimZVoxel ] + set zVoxel [ expr round( $floatLoc ) ] + return "$xVoxel $yVoxel $zVoxel" + +} + +proc PointCoord { xVoxel yVoxel zVoxel xOrig yOrig zOrig dimXVoxel dimYVoxel dimZVoxel } { + + + set floatLoc [ expr $xVoxel * $dimXVoxel ] + set xPto [ expr $floatLoc + $xOrig ] + + set floatLoc [ expr $yVoxel * $dimYVoxel ] + set yPto [ expr $floatLoc + $yOrig ] + + set floatLoc [ expr $zVoxel * $dimZVoxel ] + set zPto [ expr $floatLoc + $zOrig ] + + return "$xPto $yPto $zPto" +} + +proc DrawSphere { name radius xc yc zc r g b } { + + vtkSphereSource $name + $name SetRadius $radius + $name SetCenter $xc $yc $zc + vtkPolyDataMapper mapper_sphere_$name + mapper_sphere_$name SetInput [ $name GetOutput ] + mapper_sphere_$name ImmediateModeRenderingOn + vtkActor actor_sphere_$name + actor_sphere_$name SetMapper mapper_sphere_$name + [ actor_sphere_$name GetProperty ] SetColor $r $g $b + + return "actor_sphere_$name" + +} + +proc GetSphereActorName { name } { + + return "actor_sphere_$name" + +} + +proc DeleteSphere { name } { + + catch { actor_sphere_$name Delete } + catch { mapper_sphere_$name Delete } + catch { $name Delete } + +} + +proc pick_point_local_actor { x y renderer actor { tol 0.025 } } { + +# catch { pick_point_local_cell_picker Delete } +# +# vtkWorldPointPicker pick_point_local_cell_picker +# pick_point_local_cell_picker Pick $x $y 0 $renderer +# set pickWPPos [ pick_point_local_cell_picker GetPickPosition ] +# +# catch { pick_point_local_cell_picker Delete } +# return $pickWPPos +# + catch { pick_point_local_cell_picker Delete } + + set actors [ $renderer GetActors ] + vtkCellPicker pick_point_local_cell_picker + pick_point_local_cell_picker SetTolerance $tol + pick_point_local_cell_picker Pick $x $y 0 $renderer + set positions [ pick_point_local_cell_picker GetPickedPositions ] + + set ret {} + for { set i 0 } { $i < [ $actors GetNumberOfItems ] } { incr i } { + + set act [ $actors GetItemAsObject $i ] + if { [ string compare $act $actor ] == 0 } { + + set ret [ $positions GetPoint $i ] + break + + } + + } + catch { pick_point_local_cell_picker Delete } + return $ret + +} + +proc change_float_precision { number decimals } { + + set l [ split $number . ] + set ret $number + if { [ llength $l ] == 2 } { + + set ret "[ lindex $l 0 ]." + for { set i 0 } { $i < $decimals } { incr i } { + + set ret "$ret[ string index [ lindex $l 1 ] $i ]" + + } + + } + return $ret + +} + +# EOF - general.tcl diff --git a/lib/maracasVisuLib/src/interface/tcl/icons/3D.gif b/lib/maracasVisuLib/src/interface/tcl/icons/3D.gif new file mode 100644 index 0000000000000000000000000000000000000000..df0ac920a0e073e5f3cbc2a410fcfa930bd92169 GIT binary patch literal 1836 zcmcIk&ubf35dLHvRz0`53T7!15p!`98FI>+BHoA5y4phfI?jyA5-X|7rFChSJn^eV|S(Z-pres zH{Un&cJ8BDckjw1%1Xz8HjI3@9d1{zDW4F4r3DADWCPzn$PPC!z_ zpOZ3|0oh*AtQndOgPit&e>_LmaX%oZLB=ZsU0a& zcBc5;?-J75`pV|5FVcRk*N;q|kg}U|Yp|;08?*JdIkTtxxDYyxq;&1@=g{=i_koQt2|v5DzcrDHL;3Bf;tK!8f+nmg zRgwGwJ3Pph^O<+QecYS`;tMg>EwmZ@Sr%yUZoj$n!RQNlB#1N<4E~qSKJHz6)~qMB z^O3@Tj{%;EL>+!*`u@up7D?d?rNIDih-KNOVScsw$^eE?2C?NaK&$wi(a#*hEl>TF z`V%Om62b*oXMk6DJ$_mFCb551Hj`_y&q(6|xy2rUMQ^!ck6mB=8p!Ch2?MLMjBl6( zk`m8%aJ1y#Pqg-6B!NQ^dNQ$X0vXX>qC#QWXSL?rR5dT9JwgEtxk=lK1cDUd2hE)x{#lm7S>$F z_QU2IFZtbz15~{W2~TQ;&6pR20ysySDl=GgcuOL?z20QPZ+>Fc*ip08@@|SI(MqR8H zWUJV{Jj0o@&!QkLxD&wLnttNWEMLhRLn18o`R*naS!V9~Zdt)*7NR{G&33QjKr;QQ^-6u;%m2<$@G}UWOGl}Nkm&OE#uQ4*spF?Zr|cOgW-MxS zB8DZwtMG$QCLvCuf|UXi^GY1hl0-qFh(ZrBDI97MX~IFlb#e?(>f}VkCOJdF@5zDU Qs+@weLmHJXF5$y}0h+RvX#fBK literal 0 HcmV?d00001 diff --git a/lib/maracasVisuLib/src/interface/tcl/icons/add.gif b/lib/maracasVisuLib/src/interface/tcl/icons/add.gif new file mode 100644 index 0000000000000000000000000000000000000000..b46a8e674901e07ba4c9f53e7cf1ecc7c39118f4 GIT binary patch literal 1836 zcmbVMUuYY39RKFlc+S*Iw?PU`Je!e+!itohlpCJ4Ys1Vy*5HFw*h5>kE5eY=gOEan z*kZDDbV<7@oQ{&w7r{M5gW%p$W16)DDuNH&)6&bP)0d^yhxw56`~79PTv7(=@3`Oh zzW4k7`+UB?-|y{nXXVo~0T_nAP5~PdNC1*V6BGC;Nh&^)s?x*+eyXajs%4sVUDeA> zkxW%8tEx$B__xen)g%Q6swPe4vR*bx(w9jZs;0?a6lSB2|1tZYb~ykB@xeiu;D!2_ z=W22Go2kM7C}RKK;o8Fotp6ZDZu2e?H`M#V7Wois=5} zdL-~-I|y+%S@lO=^K_>tPJXJauO#-gtew#N(Gl_8E5VbIq0d~&;7hBDcX=Z+-NKnE zoT*(_#8jf{|7fsR*v3R7?$UVPD#9c1mvU$laBmkjFUbD25^BD&c#E`G1c5K+?nTig zv9zfnBcUfhhO_S>b-c;g80_f38a| z1Uqj(bjJu__Pz{!!uUxGO)-G2&B21fzz(N93B(fd!ma%VKx=alT;~(nx45)1GZs{C zcQ*lACyEZ8y~9m>b$g+VwYH!|j#@_t1Op6`B?|v zJ~1a`0X!~%>=b|t3B~f*p+f=FHWSEmxP literal 0 HcmV?d00001 diff --git a/lib/maracasVisuLib/src/interface/tcl/icons/area.gif b/lib/maracasVisuLib/src/interface/tcl/icons/area.gif new file mode 100644 index 0000000000000000000000000000000000000000..7e27d0c2725d497a77b251281d03732e4e62d9a0 GIT binary patch literal 862 zcmb_aF>b>!3}mSc?pRM5DFP`xbP&MBLH8DYMt>sMAM=~Kb#Y3GlG32s8Z8H&#k(Wr z_m8*v{CR>Cd^rG!7l3WsF8OF}$A2Fl01ohy%5)dpJ~1!Md`B3cdSZU^e~rdthvXys zP9#5e$P!)$2EvIk5-U`r$XX#R3^Y+CmvjYlHSkVV6dS7_wb3@BqIOla7c3<5z_l+j zmEEZYRx!dtY8X<(Ts2bL)xr8234;!S2tyj8wigx7LlpOW!d~ahqEY{fl%j$;1qpL- zt1}RbjpAk}QG$W9ph0E{t2hIp{1T{@tRe-RJx{nHMK_|m!{6?j<@#nfIqR1HO+L5% LwqK^B{Rpo=53-@Q literal 0 HcmV?d00001 diff --git a/lib/maracasVisuLib/src/interface/tcl/icons/back.gif b/lib/maracasVisuLib/src/interface/tcl/icons/back.gif new file mode 100644 index 0000000000000000000000000000000000000000..3df3b36eb85596ef31b5e2473b390eeabcc7cd16 GIT binary patch literal 1294 zcmZ?wbhEHbRADe;_{`4$2F5_Zz>sEaoR*db#>O+#(q_(_3BogHo;h;{i2wip55kH+ zSr{1@_!)FS8bM|-u>AY5_xru-_duc}eq zlagN9iX7v30uL;XKEq=YM8YC-xY!nRtR?K%>Vn!2lWq?DA5{ zJ%%hrAXix@_c-#v!oBQ}1aqHY0MNGbV-f{CNj+5{9nJ57wkagDY?7#1eUPxF9 z$Rze8Tmcz_mK-ifv~XZc4%aUz9NhynA7K>KH*H)dP!_6Dw#$LW4@AoP2aYfD5!?2QXEFv@slDKLC;ia+yAWB!DIh gfbFmanhR6{ase(6?gu+?AOaq*vxsz+J`;mA03`4?#sB~S literal 0 HcmV?d00001 diff --git a/lib/maracasVisuLib/src/interface/tcl/icons/bright.gif b/lib/maracasVisuLib/src/interface/tcl/icons/bright.gif new file mode 100644 index 0000000000000000000000000000000000000000..ed07e5bf2cf50dac2d92c853d3081ce542a2c090 GIT binary patch literal 1294 zcmbW1ze^)Q6vtnFkOaXca9krP6fFE*+!DxY6GarSu&^*-6&n%OLf!iVBHCVQ5r_~A z%as(Su~7>xJP207!oos`y_HS$ec#NQ*|66*OCHO-na_OZ``%`GWvSq7j?yoB8zdPv z$zyZ0?JbO|{b6ra@l@saA%ho>yeDHs7ENIz7?kWjIGvi;;&6z7x7?rLtu6@;>675? zRW0^f^Ssz9Ak1oj*F#-LqjJ0dK~)sqK*cl^swAsb@sV|p)w7IPNR?Gc7hV4*Rq^C- z19i~eaQ$Yg|AGm>*)De_6TTs1n%Hua(s$LYhYhzO3D#zqWnBorU3PsXTFXlK`9~bg z*=v|3rc#`8FrO%kVDUu)RGN~Q!Wd?sWQU++DkG68Unpx#;&>$jb$+ov zynsX>YSM2WWGC*7c2KCI+xU5uEyL81s?xw%y|Px{({7`)u7o;>F3q1ZKg?Q1UpM}~ zDA5M%3@v?&@6cd5ou_Ry{EvHqny5v51WWt9e+Rv-G_>RA_XQtD@rO1&6;Z>>_`ujd K-~}}kr@2p941B}@ literal 0 HcmV?d00001 diff --git a/lib/maracasVisuLib/src/interface/tcl/icons/clear.gif b/lib/maracasVisuLib/src/interface/tcl/icons/clear.gif new file mode 100644 index 0000000000000000000000000000000000000000..e63a2d1af99cebeb47689580d2b95e5c6a90d573 GIT binary patch literal 862 zcmd^6yAHxI47@fBWvk1Qv5f>`U`XX9h#kad@Fy+(v3?U9OCfQfJjB3?@N&9~WuGs* z{no7ybIfs40GbQX_x(l6^H|k+k^mE|0u8-T!_t_eG3KA3pm=SetKsQ*PXoKbm{PUCqgYcLL@wn6)37#d_a=fD5oNSoRM2?QLmbRKi`(PJ48}wxiq|ne%@$v| HpJH{0}N3aI=G$NOe@%z4twj$0lJ}qw$-M`_4J{ zoa^D%?eNVHrn^CfSAJlhKK3#CjJ`g@FaT(!Gdc{z!au{ZEC5_HeULGrWZ*g7vMi&N zflP)jN*SwEvND-c2@m{c2QHlBfBNnyNCJQY-Gom)L48s8x+O88D{PTHUiZ*OqKDPGw`N)d*!P+)VGn%PeU+%D8V!6Q)cCU*54Ep^^My!otvQ!JrAq8N8fsH)TF!p7m5pKL z@$-!cqdjF^zuAO7f7o#l3;F)UAmZB9gN8HVuI%){!4@`8%-%XZjF_sQx;9P!L2mE& zDWD*Vb}lR|*RBF+7dEK9?>Tb4HnpWp9oQv2x(QSBd&9y(Or^?nyx(m8J3k)n5o(f9 zn(EJlX$jC*;WMg4E420Gp$PV*@j$N2SDL~d5L4U7SORT34btmRn7xuy`OPj4h2$B= zl4!_U#ssF|$7JU@dw0$5mU;1UWJnSjSjabaEW+K^HmIGZK)x{2^~6g@kV;d#nCBgBu`(mfU&Vbt9aXRHKb>72ddC_KQzb@l z_9e*VukBqz|9<&eDm~ZVa{K4?Y*gLhP5h7)*LP}WWH;LV?PwsiI?{QMz@n-(dMy4E zg2hYqE-_(NFaxvOld84c)#780U}dOnCnrRD<;zVD?X=pu^y^F-uC0z7evZm~V*wl^ z&65~BCE8*|VT$@(8gBX84dx%ijJNSG7kFe(6&eOI`r8avJ{XCDD8P3g2U6)N5Y54a z;Dm*k66amjC8ig8+9(N-uT=QBF@f0|NZZgQaGTsP)nhg4>*rdI!Th2+K;vM%#aTlxNIroq=0Zop;ekcx%ZmV!?20qNp z130g~{LECmOblTH=%`FWOWs1u`M_lFHh=*IE5T{0!p?{oicTd6#^jcRxMxdpdH^73 z$B|-9X0#n2(*FmfKtj6Vbo~~g)!X^|(s88v*_$pCG_%Q$?gG=$SL%#`RhKA4JW>auv|h}Ui3#1c%7qu>V6e<5sUGrMHDFq=snwMz>#*2D#2m_N9&DoB)u`zprL lGk!(;gaPI~yGdij8Avvs@_h-0d2V7V(UFLn1Y`+5{15yH^qBwv literal 0 HcmV?d00001 diff --git a/lib/maracasVisuLib/src/interface/tcl/icons/continue.gif b/lib/maracasVisuLib/src/interface/tcl/icons/continue.gif new file mode 100644 index 0000000000000000000000000000000000000000..eb992d8df9f7d785c20bef68e015bccf68de8cd3 GIT binary patch literal 1836 zcmcIlL1@!Z7=Dd$Hf2cnEIstpcJ1h-hp~jAIAM#mi`~SwY_Ox-Sm?ltM~@wJYM5ol zwMrOB(=u>3hdX#2(kVy|9bSef@#J*}4_;dTm-Lk^>rg?{l9$)~-~WH#_rLc#bt`%0 z>OusKq90L2E}rMfjf}j^%LvIZ!UMT9)JD94WP_ItS(9Z0A%ll6-$tm-!rq^h|D33c8EV5H?PdahtA^SZ^ke zrHHqf9ag0XRuUc2EixvnPouo2ByKf_;H7{4fO$6`$4WPwFR+%ZPWK6(HL-qsahKp5 zFqEljx_8AFSRHxU?-gn@qS9E}43@ES5YD6`X2_S~n6Bo8!0M>?QxQX!4R*mR#r?|7 z8c`j+8$NdDMLnJK)n;PP28IPsUff88cY%cE)%+$3$T5cIm0shHqV3;JO!K|<1DwIwB3TSLM=3?2x$ zl&Ci)0aS<9BN@6l%+{5qaR?!4#KA*JVCKg3u1!P>^FF8^f!xd!!Ba|x*Oz_F3u+TB zl=xlB8Qg6PdIFlzg-=T}W zSh?^415aA^1kdg4%7m0?jclcJCLX^zk;dYLC!b6A90KjxxPJC)NImMV1N%F=iu;Om zso8b@|4nD-(reQZn_3P_><{9 literal 0 HcmV?d00001 diff --git a/lib/maracasVisuLib/src/interface/tcl/icons/del_axis.gif b/lib/maracasVisuLib/src/interface/tcl/icons/del_axis.gif new file mode 100644 index 0000000000000000000000000000000000000000..3809984b862f5b42156f0f0ae9edcd92bb3812af GIT binary patch literal 1836 zcmb_c-Ahwp7=Mm!YeyH2&Bk0=uI%W=h{MjgD2sy(a|TCT)P-IIo5*2EcOiH&VW|sc z$pn);LQFA*?$Z7NgOUalKmPzPB=WYc3%%HS-uG?26%jJ@wU=lwk&zu)sb$N#AN z?!8bec;VM=pqBswfFRI??1CaF01EDSqu{M7D0xLufh>wD2&$r_1tBj8X+_8@xYA=) zQ1LXaq*WoUDtWxeD~&%jjcYoe&yzo1TGaotx=#%Z00$o8jc@`}u5&Imjz7Z;JJ^Z@*h6YW`c2!2SnTElsGK9E}146H0O>6-KSwGxzmf z!yxZ8QcAXXtZM}!%ZZ-M=!5H5J3n-J=jBc`hXt*2O_q4yRMxVp#<5V`p z*Bhaz>r>uoX-N4qY;W|f)%=2q^sHWnrQCqWtS`tlhi&`oPeK>K3K3s2F%&8`hgLe? z!_6nYqgoxyedb0~#HAA*xjebKF^hC}+YI$%zNLUU%Pf}nmU(JCB!;#*ncVCA&_aXB4??&*}I=U3`2Zf-gl@Z?%i zbZT$kEpwygbkMTi9~N(v6D)f&9fjNjg%ap|>nNFD#dJ?aF8ZNsD!%+nqB`?)44vLt zt)U|_<;u8lb1c9D6sC^Y*ZnCS`C#A~LP*0_*dY?|B{@S#${_thmi|m@r*(Mcm`;?6{-QX$9` zhShvh2vU)u1#*SBwJ8MGL7SB*rSxc0!Djks!vnK=* zQX20<_fnojCRB~ci~5w;iWpEk1N4!4>Y9tBZ4mL0sIB>?+E+ko%*h;1osoh2zX39< Bis}FW literal 0 HcmV?d00001 diff --git a/lib/maracasVisuLib/src/interface/tcl/icons/excel.gif b/lib/maracasVisuLib/src/interface/tcl/icons/excel.gif new file mode 100644 index 0000000000000000000000000000000000000000..4c46834c7d7e319178664a67bb59dccda329ff28 GIT binary patch literal 1844 zcmaJ>!D<;}V0o_p?1ULC#kp1!Hl4*f2Zd|cNh zd|bCf9Xu{R)bG=L-tTlG!m$%YojyNN6!mdEpGR}~sQCZvkN*}8B8#ew;hZF9P9w0E ztnT%NzvN!D_2u}Ys?XNpGLp;cgO&ZPq6*}--0+Ln}_aYRK)>Eo$A+O}oZEtOl7tFIE!y4eoZ z*ZdChGw=Mgd9&NPIZ1UT?TZHNwkF3ZjBf2&IGWn`o&;)@_GM#cc)f7_ArL`%Pp!M} z9t`Wb?lHjGvs>c>UT-(=Tv4Jm_T~H(LjCbElr863y*h2%x834TQ zRaO%*;catpusR$3^eqYjDutDAMZf;uT2By`FvCK#T=O?YuyJe;x2e%<*4s{LWg*vs z2)DKI$G0Z-F#s21{$0c;8#l|eBE2Q!f&C1LoXi^Jf$q{Hh(UtrY(N0BND)PNa7g48rhIt(6% z!v=(Kslcbzr=_Rvozyv1ZQd8wg95baxhRk;VR~#OAWP0a4Jk5&FdURAUm%xn5zo@m z8EqAcl%N&muB=D+j0c9uVIyKNhfABRMwiQ$W^+AB8c0{3^3Ez{EZ%|~XND!N$r`fK M^&lj^+&AgjKR|M-VE_OC literal 0 HcmV?d00001 diff --git a/lib/maracasVisuLib/src/interface/tcl/icons/extract.gif b/lib/maracasVisuLib/src/interface/tcl/icons/extract.gif new file mode 100644 index 0000000000000000000000000000000000000000..cb3733ce08f39d57bbaec8cac52d60922a7f38c8 GIT binary patch literal 1836 zcmb_c&r9227=BaIVoDH`Rw<*PO|w$OLuh*F7)aG@#;vlsdDzi{Wb@|6u0lnpDY#); z#>`;2gKYaVthzxV4Dm0RKk&TE4qn>5-Y!O6LCDNYL+f2^D-hfWWx&#ik|;Ut@V?pw)#* zhJ_kCm$LQkjoTBVrA3AH%3L`3Wtn?H8R4?RSRa;R6`pNWC|9*)ILH^xxHMge93@v69l$d8Yk9@R;*vfbjflPH z62cvX!q{+8m#o$Nr8wy5W|K-{K$z4-Yg85%G-M>|CH<+iw~25|W*W1^#Rb{-(W|XM z&-ilen7DkCrMH?~>XcuQ|1rUyAr_j&8&0iYSmXlh@e@-YobiS?CRd#o!w~{ke6Mv1 zjv`uk{7k9INIDf>=&+mqhAMN58OaOKWBGqA$MTI4bm*3P2K;N@4yo0;>H50>yyUzs z=M6SpE9!2Wj#Q|5u(U?FbsMAe;U)?J3caDm_I`=RP>E%Z>;=riroC-57{{TObLc_@ z3k41oT*NpZD!h>zpa-@9(879GE-YEZoC^L+n{l|912-JtkXVUA6_d5ZU8TlF{Dv+e zx1QTe;xktx{bFCFU?=!%Mv!YAofoGI9&vU{)*KzyyDl~1j>2{M2?5g7{=bA>3cg8& rSGFv|p~N7u6leR$+*u*@EIgvbw#BF2VO@;}x%awsvvAk>8MylwFNAG= literal 0 HcmV?d00001 diff --git a/lib/maracasVisuLib/src/interface/tcl/icons/help.gif b/lib/maracasVisuLib/src/interface/tcl/icons/help.gif new file mode 100644 index 0000000000000000000000000000000000000000..0f51e1eeb8b5ef795c7e68174321aec9f6babd96 GIT binary patch literal 1294 zcmd6n&r2IY6vy8tt2>H>3Gomihg~WDfF7);Oq)Y?Dg6N=DgFbNhR|c1y?9*BDmj#r zLl35m5>NgaRVh?N*8T~xpzBfSsh6bRncdV<|AEe7_U*iVpZ&f!Z|3>SXJzsF0WH%{ zi!d6E2GOw5=ytn};gIkc>Y;r1hV#obh!{Oo9>pMYz@5U%(y>`s3Fda!Gahq7{!~rg zg7o_$mVPASQr6H8Ol|I6>$M~0Ftglav-lVhweqcYVA}jvRE`vNt|$p=!WyIe2vr0i zMST?3STI6${hY^@f>;(PAW{y6f*>7{s$#a8pqAs(#vLkhNyS1{t*r4QRXosXF{hrZ zSTpsGJ3bTk1}@usL*Ogc!8>5?SXDFmvBy3`kq+igoj zCCoe&X?}ZZd9LT5iTP?vqfUgipX6{ZZa?{}D4<5wBcU^df>rT?IsL_0qqegbNr^6} zH=_IvbE3uhD*kaQeaN3}eQ;yh49hk4DiRAeP!OalQOH%UWZ`RmORn|BksWqKtc!I} zi^NrFqg_0d{v=~=I5v$U2M?xk*_jrbsky!%_#pvHgoJd6iuq?Y^rJEMmEjqtCG1=MXtSc>t*)BpuM$7 zkoi^trXgQ<79tGV@oDK86tqLD<3dnpQ`fy$;!{bJG9p_wvmOTZNf#PTs=q^qiIt)8 z)Ji%_d9j6qkY~nWrYt8!hIqx4wic{=tUnE}WTjNFQtN+5(O(IEfoLLRh(!~Jz#Y{H zhX>b$N{Ks^R4~oZ2*_ku%MgV&Vs(Tn7AXL=sfzsoZ-gSkm!4kZxO&vq>$3yP2)Ie$ bA>yv?go}nkcyUX4$4?$4L2BpXc)D*l?kLKbh-~k+Q;?h6C!HMQgW!huV|_s!U@(}rp4UGL6(^Ub%jewQ4LUw+z?7qT1(Y@e3nZ$Hm-5ssYk zKhMijq|EchzASQCCT=oBcl z(1xiCPiuEyA|I=%{$vPGb*{HDBDO#v-M9r$;zZc-XXZv&U{-;hFd(4w(>oAfusdX6 zYB-Tk96Ee29`)&o5X%xVBX+xv8L_kbF?@=2*bQYR5>#9PWYpm?n7HgS;9C4Dx=I}& zA5PM67bwUIi+t5ZE8#oRgp<%sIzfvxqH4=@lJq7gJuW035`gR;c1seMThFXR?aR#DU zR@#9D_DmJ?hVVr3-W>O<7HT)DQHQS6PJDecqzc-cL~k`M)BKF4KZ-L5H0_|~MooR~ zvPVYoWAE@>vs7vZ8%^63mZ1~dCyzN_3s7wg`7Mjc>~7A6uT1X|b{a*{{IoQyJvPVf zpMd6;ZaP<=0Cdp3^)@(?p-y$!4i4(L=agpC+TR!Kuui?<&;>VNU!e$v#+{8Ez_HFm zT%<0*#7dXPj6+hAvci(ya0p`o0HPn_7~ILw{}xG5qATd!;w>vz6qM8rO^>?ae@ESx zs`_1~uLjjPJHG%L2{dN@+UjgHhYD$?k%8OX7A@Am)sYWm0b2)M6r6Kke&KGjeuzzU zR%mRH1`|{(K~q0b;K>7Ypx$&NKFjPnWk7Td1fU_Pj{dCDlo*=Pb>!3}nd+?$}HjX#y!cbP&MBMfMhbMt>s2AM=~KWpPT1HXH*Q0$9s|2aO`(0vIpAQ__0PxTN66gNO?Q8 zJDp*+Gb@MjsyD3?=xko1SbEq=6mEnwuveBAmQLgj`6?_;MCia`f`#ljRvXxO$3~hN z4APE=gR6w(!LTFFRSg?VtP_d`Dt?6%zIpo3(gR0lBPbV zzt8yX{nbC8k8p&K1EkYl0LF2=q$AY*=ivt67M|woJPT^_L_HDx5!BwKg6w(qFpDXr zGR@l8vysin>XgWQl1^05k%~N7U8S6MFRt1n$)*Rn3aN~ot`FO^1MCU6UF=*JJ0iV_ zt%yp(9?6v(ZA+!2jtzwJx<@AtmeshbEZ82(XkuHjUwqgMg7{fg273 q8v&MP7;iiSp6>Np^n`w|lN{}K zoA7J5`~5!uGNSRgpJn|qA6b@-Z*DNM8##2%f1V%y@f{*XE!Oj%bZ6f5W3^Lgk= z-zg_g8mp$TwhVI8xIAu@dL#DJVsi8RxN+{7S___wS+M%v+NgxY#`*cNZPmaHHojmR zx8V@XW0hOqw0v--p^plGvdt3uXj)&ok%x~GBX-an)YL;df4R0bXddb24G!<(K+OFft=? z-lFH5{hJ;wc(UR6>L_0~upCYVctnd&!u&~LSjqwNW1^^uTfzln3Ewt9LfpjP7o1s1 zgbyBoa!am~LM4xZ<~%FQHIxAa9VlET+c-kUq-JRZlxgmd#d-->xPWzBU`s}oDOBE< z*euz(6k`{(0ng1jF{#KqvJQZ9AcEl6GB?R_m4pAj|KXfbNi{N@Jc(S{ilYHvjss~&iZ${Qf)x$Hn zziGm3>MHLeWM5=rI|44@b5co^2e+_36$5#%){LzzOa{dW#4AqQr3l`bInru91rcP0mY$plOor zs1ZQ~w{zOj##O_s@=8&(Z8tIcs6($>i{YXzuB)q#%N#DP6iK}`Lh=9ljwq344&t$z znVxAWM?ALr9q~F})0R5ObAR>S|NW#7xGSjNO?~ctcGqk5yXh|`SET1H7e4**B@_G| zCiH|$?5~)=ik435y5MJUo(FRO(38yN1O%mcbzzGn;xQih7|yBo5^<&Zjm!5h5T8rE nV(N2x_}Oz{fVcXCnNQsPG?!2X`k(B6I5E`Y%!{ZiWpDoiR7p^F literal 0 HcmV?d00001 diff --git a/lib/maracasVisuLib/src/interface/tcl/icons/params.gif b/lib/maracasVisuLib/src/interface/tcl/icons/params.gif new file mode 100644 index 0000000000000000000000000000000000000000..bcea0bb2e501e759be41d431c62b6e8b7b95874a GIT binary patch literal 1844 zcmd6nJ!{)g6o!x78*ofAL`sK31OCvUA%(QakWe}V`f(K^5B>%2lDR{EfSf{7TvCkO zMVl!ZG8aSFY+XFb`2imC6TEb>`ySm$x^mr*vC^@9eR=PB&v|t0H{R?0gSWf%jAka` zIzjLi;Xa9?h=@OV#jhwD)b%GTqPuF- zpNQ7VeQSSZ5`Q`Q>BjeWupV?km402xSrdIu4FwA7a$&XaO_ zKm5t$_CJ43E`AW*0xq8e6QcG?{g zZY6?|99+qPXe|*rvmbT09-9te9fB9$6%mD=xtvO~BhJNkK;;`M2ec83ph#p3kItxi zu{c5v9KzFGzy&jc2~TJy0+)Nqp)*!4at_6(+aPQ-5pkmkUbHR}7VQSA^i7T?Y;x+Z zZ`C~D3>%2%a3(KjXjmUbG!rnaTgd@r!n?d9ZYG6}w%6w$%b*W_{+z5?h_I$TgYZbP##zBTSU?6pJW^ilL5#mO<&G&1-~v51p@b~e zv}ljrmC~B4lTehk6e>}264}+^iHoF}2HCSVG&H~C@{fOwf8?Ui3sXo#AI5AG3skOu YP1gnJ-_qT}H0GP&^dFYKU83hd0oD(sd;kCd literal 0 HcmV?d00001 diff --git a/lib/maracasVisuLib/src/interface/tcl/icons/plans.gif b/lib/maracasVisuLib/src/interface/tcl/icons/plans.gif new file mode 100644 index 0000000000000000000000000000000000000000..f7a5a295963886116fc9a22a9477bbda8fa5b23f GIT binary patch literal 1844 zcmZux&ui0Q82x*Z%Q zr|3r5)x+>A40MNJcdP6q`WHw?(M#w1e!rS+hOh0L?|bsR&-=bl`e1H$@@}m_?vOK$ zz-8bv4Eiw*!z89@8u0Om=^3VHnvp>wy!AZ8^Gq)yUSxQY>A_9pndh+Oc@eD0J3l{1 z#@Lnrn@$j-kpk{vPBPRFLfgNxPWKvDH*rUKDfUYuz{j-%_#W91Ji|xhu-OW2AlJ?; ziA<9$je&e(c+d8GWw<@*;x{fJp9NtIKQVj+L8%p%GJgaBVI!#hz3qP)*N?0>$X{%y z=;J(lLxUPA22;RhZ#uIdS8n?*1rXwgeJZ_IY^7|isjJC>R-I!|@oBfX-79RaEiY6X z4o?G&96`!fJ9U3Mv@@@2PwUlOAk`#@$}!Gw%Xjr-qqbYGb%re2bUJf}$!bmKc=hph zw|;Xr&pQISFiVoNGzy*9wRan}&I|%*(=iu6g`e{CF?UIK=Q@Y_rql^YL^$w)0jP^h zqif6Urj9B4m;guGVts|IWE(EEWBdnMMSu zR2QqaA2u*SJ0<;s$kRPKz43(`>&t3_dO^A1qad7N)BF5U{|b`nc)z8PT&(=HDVl|3 zQ`i>^=ATKI;uaWNe?p})nA(QnQJx>tCcE`9>XAM`%DS^990*(@O+7bsixD_4Cbzh6 zQA8H4PK!Cz>2y{1R}O^e;K_kX8oNa;=@6p2E6fH1bIJGU*?u1R^DGsSBOOqUR_1@^ z0)7rHiIIe?FQuKXuo=R1POensc;?f#S^*(~1*KL_y8U9Cz9H0&Gc;u$ad4HPuMTuB z3vZ67YKH~r7l36q;LS`APX8mF;-%G*2h7ahj`&CiB)*b_nZuGvSr8{@3^;jW>BIuD zewctwFgXVk2Ld=HLBdhs?@k6uL7Tu7eQ`z(7!Jh=eHa9ae3A$Fyy6Ib;2{f2f?E)w zfg7m^NGSkVMoc=*DryTvAT%ME1Pv)5zRyO=j-VcS6eEwdOd*%aQ4-V$%0UA*3)Uy8 zUKob8inf5YMx|v7q0nIVaG(%6N$eV%0~OSOP2OxwCSv;kBCDdE0$Q7>FhBw@MkN84 NrSt5Fj literal 0 HcmV?d00001 diff --git a/lib/maracasVisuLib/src/interface/tcl/icons/quant.gif b/lib/maracasVisuLib/src/interface/tcl/icons/quant.gif new file mode 100644 index 0000000000000000000000000000000000000000..af0c0711e8bcecce70902690db37829e8729f24d GIT binary patch literal 2233 zcmb`IF;Ck-6vv-~tz-c#WJ?SljJkASpbe>lnj)uQ3ImZ%;wWRfFel;*#A7?O19afq zMCy>6b-fWhxVu z%iPI;Y55TCP&yuoCNwFZQTdck+0ITUXA@;g;<0|^kFF8fw8{YcBxBr-9<=!WTU)Q2 z`fHPWX{{+@ccyd9Y(0sLzI>VcT&o+!V!_Qx_6x787yAI%7)w4oS{X8xYNa@@Ta0kUfw@ zEo~<0g4Rj*TuQu;`VRFR(#hksY0@*2#$2dEkqGEeb0BK@VbVGq3w|h-V^OFSdo=7n zb&t)tXYAfGLTfuT{rbsP*l5Lha(LtnzgN%e2xLiVg1Ne_o!{0@njzfVokVkV|hx7L00DdinWWLqik)lW)w-9h+K0y4)}vX;MreQkicTz{I$AWIGY}TogQ*kV3eTA z<;m(~?J7-NPmjon`(v6Du)D%2Yh{f|J}?|>&l!DN-@jZJHX`F-ih)lwxujmt!BI*r zBJu4S$uY^u$e6uHl=)TSsb)52M}11lCvJ9KGn6MBc^XDKg3Mh~rpDZ{W$NltZVOM< zEmbdb{mey5S7y}H*E8Y>N3HxzTtgUWi5YErXsaU5Bn)@bM$sb;qzf+we&|~iXqY5A z#y}>TCre|jftH5?qx{dH&Jt2ZP_#PZ0ugvRf4EAC1r<%T_KNM z{zNJurI4J0#Cc)&d6IQlJjt&lj(zf^1hpiss!&{25yxtt#9T$LyvtHrFlsB3w~dfg ewUB5Q=Q7xvA__=-=5kHgZ)WoN$WgZo^ztujGzeb+ literal 0 HcmV?d00001 diff --git a/lib/maracasVisuLib/src/interface/tcl/icons/redblue.gif b/lib/maracasVisuLib/src/interface/tcl/icons/redblue.gif new file mode 100644 index 0000000000000000000000000000000000000000..2d5c80d87810d773e11e37e484bf6b2d11409eda GIT binary patch literal 1312 zcmZ?wbhEHb3}BF9_{hw_!0`V+1H-Xn$NvBSulSRNk%57kK?f+x0Fq~5`Zq-*aFI)= zkgC^+Wc;Jp^G8}Zh4F`-fPzB@G<**M6}#aJXbzy_28iM$kYY7FibcSR1;8!L>TQe!vJCj27?W1GO}WlOeRG!?%;sB`5!nu w0ukYXJvh9Of+LWmXjw!`gfAi~DdBJ`p7eqt^%Z}*r8sL)!HLv&AuEG50Q`EM&Hw-a literal 0 HcmV?d00001 diff --git a/lib/maracasVisuLib/src/interface/tcl/icons/redgreen.gif b/lib/maracasVisuLib/src/interface/tcl/icons/redgreen.gif new file mode 100644 index 0000000000000000000000000000000000000000..003e98e911337e30f629897f8d14d0f06a5b4ec6 GIT binary patch literal 1312 zcmZ?wbhEHb3}BF9_{hw_@E-^njvYJp|Nno*pDc_F49pBV3_t*qXJGm_MI&&LOQ(>k z*N9~NquBFDS~!LAhn;|eLkBc`4*?as;R|REpyCFI;v|q_H9U$%z={RHF_#Ed+=DwV zS-^@JK#C0!ivMAcc`i)VJ~)krDON-n?K8swVh09;4Qev7VvWxV<*pbc6^uKO&lB%r<)piEO{g+?5=WA_s)u9@72EaRgw)3Bq{Rcv6nm zSnx5cxj4aV8jmxlQz}aoP)O@aeRDb@-U6%I!bAXA{UbuY<%QIIvo`hdrto6zYYG8~ zQu0sS6UbBPr1)6iuekzakq~_3bB&zPs_u&s59bLpKKfBa?t63|7k`ONm@ z{yaNyF_I?Z)hYIYWF0c!T<|@W&|4##5{2(bVdC~u z=?Is3j2=~zZ!TK<62U5ZXMdS_&i-*Vzw9jnFK&Hx1)ig&3(^ST_+RjL-rr^_Fj_jE HfzRFpUotRs literal 0 HcmV?d00001 diff --git a/lib/maracasVisuLib/src/interface/tcl/icons/save.gif b/lib/maracasVisuLib/src/interface/tcl/icons/save.gif new file mode 100644 index 0000000000000000000000000000000000000000..605ffd6bbd454a0018330d06e7a7bd31ab8ac491 GIT binary patch literal 1844 zcma)6J#W)c6unN|$k0GMbTFuu0?Oc_L(_Bsk-?4-CsAm&99!E6=~Uu!>KX1fOztyA?J-}I}1WopA4uU zIo-1(o=@$qkQ5-4n`i)`-es@Rebwj=s+Mur$dfSO+^xKp7{~0?FDR1>U)YNo1y~LL z;Y+8?fIwAYF%nQSXE_kV6ZYT^qyHdxxw3dsF`JJ|04;esr!KedGfR`p`0?a@Z%RT-57CVh!xTk zKz{Qt_B@i)^W?aGBd-*6;xrMn00kWe5~M!(?bowRjv_~pX3{weL|hx84(DPgU`k4Izhtk9Kkthyis~7; zN&z9F%5>3~3MJ%1hGf9XA~(oIUuZV4l~WM;o~4U-!OlJjs{}>j3)`VgL1&^jxXwKz vl%xpbkQK7Knq|Tl7}QY=9A$ls@yQZw5Fj-$Irp$3ofY$WnDo3;q6fbLu9O?4 literal 0 HcmV?d00001 diff --git a/lib/maracasVisuLib/src/interface/tcl/icons/subtract.gif b/lib/maracasVisuLib/src/interface/tcl/icons/subtract.gif new file mode 100644 index 0000000000000000000000000000000000000000..00a8e525bbbf6ee12685a170cf0cbff46f53da65 GIT binary patch literal 1844 zcmaJ>&1%~~5FQx|+(V&mY|&#{BIqHf#)pI^5Ys3{6ocJZLCQ(}k;nt|0ag@xOn-<4 zy7?6fg+4>U&@_33&?jgvz1aO`R)2BRuGf~lGyBaq-^}h)cYky1#X3Ert1e+|@QCr* zh~t=upZvz(IL=+rw7{HEmSu}swph#-G8p9_v$Q2$R`@FhDJ9uc1^mDCg3Jf2pqUEjsk}qyo55KNE#Vd zi*`*v#k|fF%q{Yj;J^Vm>@ZQcR%)K+SVbTJYva(QZU}Ju)NXS)o^z(INhr7ii?G@D zykPpKB5e%~ScR_gOy+v{(wo?Jfdc9cEk&tFYP*M#YqV-qYV1KB;oS%B^SiYuqy&UB z!2q~>y5@dZtLegO!h}pL8WX@@JHt;8zpXS&X<(h!6|o1N*+2WW{V`0^pPMI_n<)|@ zew-n3m&>gkmcU_^EeX`mr3sC%EQwIp7mOw?E1WZ*g;tq7qvu&cb#6|U w2HFD-TQoZU>hLh}iWc5%2sxq1r;L4=hnyoFPUPbY52hvR8nDu(+n~pP0M&>y)c^nh literal 0 HcmV?d00001 diff --git a/lib/maracasVisuLib/src/interface/tcl/icons/wizard.gif b/lib/maracasVisuLib/src/interface/tcl/icons/wizard.gif new file mode 100644 index 0000000000000000000000000000000000000000..69b1603b1a900dfb7e30cd7ade8d5f945c48fc03 GIT binary patch literal 2460 zcmb_dPe|KP82{Ra)pk;}Ey~2XZqxb)DX!Tex*dwBQ&*jc2M-Q(NVa2j9eC^}t`&y1 zE20?{EU3fdZgVG{gE@Q$K`*=6sxUo{?XXMV-b>o1F)=8ZhP=Gwz2Eoye!uT)9(8qa z%_Cm$!rvMo2g|ZN3p`Iw7O{X?Ks-5F%mb!ZUJyVKSR?=vSS$dh_dG&?5Q{L25n#k( z3>dQr@d)!6@fed`0>T1D0>b&u;9ABP|1s(n{O(H* zq04Td5!%vlt2BI}c2$EfX8x*7g}Hw=vE|3L`<7QN zi!;Xu97ixSnq(|5L`9|@)~U{9&+^`SurfTkrNmawzFDR^s_jw6*xoWXV;bk)>F^b} z>i)I1idd_wEgcGQHuI7u3Gv}-No1g5uDjY^`*PE1k8GueWv^7uG1gf3O8>Oe`t;6C zw0RJy)FhF0u4T!-HjrtEbtd{g?lrqA!&}?RlnQ5k;eiH2*Gg&q{?DM*Vm=DE&I&7+ z1CtK5E|*4}r$H`kdY*dA8Rxp6dIzLXZcRep5=9CVkcD~n##ItAZESKn~1(WoT$_kP1$r@+0M$= z`opTQNtf=Z*U;mRTYi5Y^vrIj0!^}Lne%%7i?7l7{V)Jkd40}XNvd(C*d5;-ZnEW< zXjzwKSl=`;QDFiosN%e6vUOR8&F)3}$+HpKraB2acByu&8=<>5iU2}7EAuEvfk2&Y zX)-e+_mW-+lMz5x?L6x=OGSRDv`#;zJW*jbq*M&U=FGlal(=tV8KsONL+|pfXqmE1{MGuyJYaYX#@lLDoF!Lo}h@^ z$wMjy`DBrUVv76x;G$r;eYur%JIN@ALZeG4xdD8Xk{F1F%}6Zh4hAS1DN6d1)}}-> z%R&e#(-k?%O;li(@*(ZIE4EIjUe(U&N8ij+Q+1s(iSuSs*Xf7QN?zwvrw68PI;#;L F{0EO@yqy35 literal 0 HcmV?d00001 diff --git a/lib/maracasVisuLib/src/interface/tcl/icons/zoom.gif b/lib/maracasVisuLib/src/interface/tcl/icons/zoom.gif new file mode 100644 index 0000000000000000000000000000000000000000..9211b1f1938e0908e1dc47ec487ed31943ef525a GIT binary patch literal 1532 zcmaJ=F>ljA6n-XWsSB+XJ5q)WuIix!L#Zv~3WG8LxU)5UQtRGjZQe66LKr_kY-Nr>|z z_sDT%KCRp!*5vT%i&FnQ>Ys-w8;dlV$TfP?N$E&DX6AAKXMmyC*W?*y3E#s$D{lP? zN0ZW)Bcp5Oi-83o^a;@&IhuqBT@%43c>xaFLbhV0r4luIw-Gs&dM)!1^m4_jN6l#6kW+Ki0DisuTzz&V22C5k zH4S{eyv6PIFcVHDII%0!rd^45y6krlwS9$+eWPbpnxfit4`Tir<&K8x)&?M}Y0KU> z+FL`aU$DDa^I#L;O&jxAYIQ_uU}1cY=G*DkU24WGs+%zzWbp!~Qn|lSpao0f1x?9z zItQoqQ)aGJHye>TR7S3 +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=marTcl - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "marTcl.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "marTcl.mak" CFG="marTcl - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "marTcl - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "marTcl - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "marTcl - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "../lib" +# PROP Intermediate_Dir "tmp" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MARTCL_EXPORTS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MARTCL_EXPORTS" /D "MAR_KERNEL_USING_DLL" /D "KGFO_USING_DLL" /D "__WIN95__" /D "__WXMSW__" /D WXUSINGDLL=1 /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 +# ADD LINK32 kgfo.lib tcl83.lib tk83.lib wxmsw240.lib vtkCommon.lib vtkCommonTCL.lib /nologo /dll /machine:I386 + +!ELSEIF "$(CFG)" == "marTcl - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "../lib" +# PROP Intermediate_Dir "tmp" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MARTCL_EXPORTS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "__WIN95__" /D "__WXMSW__" /D WXUSINGDLL=1 /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MARTCL_EXPORTS" /D "MAR_KERNEL_USING_DLL" /D "KGFO_USING_DLL" /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kgfo.lib tcl83.lib tk83.lib wxmsw240d.lib vtkCommon.lib vtkCommonTCL.lib /nologo /dll /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "marTcl - Win32 Release" +# Name "marTcl - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\wrap_maracas.cxx +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=..\lib\marKernel.lib +# End Source File +# End Group +# Begin Group "Swig Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\wrap_maracas.i + +!IF "$(CFG)" == "marTcl - Win32 Release" + +# Begin Custom Build +InputPath=.\wrap_maracas.i + +"wrap_maracas.cxx" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + C:\Swig1.1\swig.exe -tcl8 -c++ -o wrap_maracas.cxx wrap_maracas.i + +# End Custom Build + +!ELSEIF "$(CFG)" == "marTcl - Win32 Debug" + +# Begin Custom Build +InputPath=.\wrap_maracas.i + +"wrap_maracas.cxx" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + C:\Swig1.1\swig.exe -tcl8 -c++ -o wrap_maracas.cxx wrap_maracas.i + +# End Custom Build + +!ENDIF + +# End Source File +# End Group +# End Target +# End Project diff --git a/lib/maracasVisuLib/src/interface/tcl/marTclInterface.h b/lib/maracasVisuLib/src/interface/tcl/marTclInterface.h new file mode 100644 index 0000000..6291206 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/tcl/marTclInterface.h @@ -0,0 +1,469 @@ +#ifndef MAR__INTERFACE__TCL__HXX +#define MAR__INTERFACE__TCL__HXX + +#include "../kernel/marInterface.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// ---------------------------------------------------------------------------- +static marInterface MyMaracasData; +static kVolume* _ucharVol = NULL; + +// ---------------------------------------------------------------------------- +void freeAllMaracasInterfaces_dll( ) +{ + MyMaracasData.reset( ); + if( _ucharVol ) delete _ucharVol; + _ucharVol = NULL; +} + +// ---------------------------------------------------------------------------- +wxStringList params_dll( ) +{ + return( MyMaracasData._parameters->getRelationalArray( ) ); + +} + +// ---------------------------------------------------------------------------- +void setParams_dll( wxStringList& raParams ) +{ + MyMaracasData._parameters->setRelationalArray( raParams ); + +} + +// ---------------------------------------------------------------------------- +bool saveParams_dll( std::string& fName ) +{ + return( MyMaracasData.saveParameters( std::string( fName ) ) ); + +} + +// ---------------------------------------------------------------------------- +bool loadParams_dll( std::string& fName ) +{ + return( MyMaracasData.loadParameters( std::string( fName ) ) ); + +} + +// ---------------------------------------------------------------------------- +void SetROIStep_dll( double vWidth ) +{ + MyMaracasData._parameters->setROIStep( vWidth ); + +} + +// ---------------------------------------------------------------------------- +double GetActualVoxelSize_dll( ) { + + return( MyMaracasData._parameters->getVoxelSize( ) ); + +} + +// ---------------------------------------------------------------------------- +wxStringList studies_dll( ) +{ + return( MyMaracasData._dicom->getStudies( ) ); +} + +// ---------------------------------------------------------------------------- +wxStringList studyData_dll( std::string& study ) +{ + MyMaracasData._dicom->setActualStudy( study ); + return( MyMaracasData._dicom->getRelationalArrayStudyData( ) ); + +} + +// ---------------------------------------------------------------------------- +wxStringList series_dll( std::string& study ) +{ + MyMaracasData._dicom->setActualStudy( study ); + return( MyMaracasData._dicom->getSeries( ) ); + +} + +// ---------------------------------------------------------------------------- +wxStringList serieData_dll( std::string& study, std::string& serie ) +{ + MyMaracasData._dicom->setActualStudy( study ); + MyMaracasData._dicom->setActualSerie( serie ); + return( MyMaracasData._dicom->getRelationalArraySerieData( ) ); + +} + +// ---------------------------------------------------------------------------- +void SubtractSeries_dll( std::string& sl, std::string& sr, std::string& ss, std::string& description ) +{/* + marDicom::SubtractSeries( + MyMaracasData._parameters, + MyMaracasData._dicom->getActualStudy( ), + sl, sr, + ss, description + ); + */ +} + +// ---------------------------------------------------------------------------- +bool LoadImages_dll( ) +{ + MyMaracasData._dicom->loadActualSerie( ); + return( true ); + +} + +// ---------------------------------------------------------------------------- +void CastVolume_dummy( ) +{ + if( _ucharVol ) delete _ucharVol; + _ucharVol = new kVolume( *( MyMaracasData._dicom->getVolume( ) ) ); + + _ucharVol->convertScale( kVolume::UCHAR, 0, 255 ); + +} + +// ---------------------------------------------------------------------------- +void LoadTkImage_dummy( uchar** image, int w, int h, + std::string& tkName, Tcl_Interp* interp ) +{ + Tk_PhotoHandle hnd; + Tk_PhotoImageBlock bl; + + hnd = Tk_FindPhoto( interp, ( char* )tkName.c_str( ) ); + if( hnd != NULL ) { + + // Image size + bl.width = w; + bl.height = h; + + // One pixel is represented with one unsigned short value + bl.pixelSize = sizeof( uchar ); + + // We're working on intensity images i.e. no RGB + bl.offset[ 0 ] = 0; + bl.offset[ 1 ] = 0; + bl.offset[ 2 ] = 0; + bl.offset[ 3 ] = 0; + + // To go to next in vertical value + bl.pitch = bl.pixelSize * bl.width; + + // Menory block + bl.pixelPtr = ( uchar* )image[ 0 ]; + + // Ok, lets do it! + Tk_PhotoPutBlock( hnd, &bl, 0, 0, bl.width, bl.height ); + + } // fi + +} + +// ---------------------------------------------------------------------------- +void LoadTkImages_dll( wxStringList& tkNames, Tcl_Interp* interp ) +{ + int k, w, h, d; + std::string tmp; + + w = MyMaracasData._dicom->getVolume( )->getXdim( ); + h = MyMaracasData._dicom->getVolume( )->getYdim( ); + d = MyMaracasData._dicom->getVolume( )->getZdim( ); + + CastVolume_dummy( ); + uchar*** vol = ( uchar*** )( _ucharVol->getData3D( ) ); + for( k = 0; k < d; k++ ) { + + tmp = tkNames[ k ]; + LoadTkImage_dummy( vol[ k ], + w, h, tmp, interp ); + + } // rof + +} + +// ---------------------------------------------------------------------------- +int GetNumberOfImages_dll( ) +{ + return( MyMaracasData._dicom->getVolume( )->getZdim( ) ); + +} + +// ---------------------------------------------------------------------------- +wxStringList GetImagesNumbers_dll( ) +{ + return( MyMaracasData._dicom->getImageNumbers( ) ); + +} + +// ---------------------------------------------------------------------------- +double GetImageIntensity_dll( int x, int y, int z ) +{ + return( MyMaracasData._dicom->getVolume( )->getPixel( x, y, z ) ); + +} + +// ---------------------------------------------------------------------------- +ushort* GetProfilFromTotalVolume_dll( int xO, int yO, int zO, + int xF, int yF, int zF ) +{ + int i; + kVolumeStat* stats = new kVolumeStat( MyMaracasData._dicom-> + getVolume( ) ); + + stats->profile( xO, yO, zO, xF, yF, zF ); + + ushort* r = new ushort[ stats->getSize( ) + 6 ]; + + r[ 0 ] = stats->getSize( ) + 6; + r[ 1 ] = ( ushort )stats->getMin( ); + r[ 2 ] = ( ushort )stats->getMax( ); + r[ 3 ] = ( ushort )stats->getAvg( ); + r[ 4 ] = ( ushort )stats->getSD( ); + r[ 5 ] = ( ushort )stats->getSize( ); + for( i = 0; i < stats->getSize( ); i++ ) + r[ i + 6 ] = ( ushort )( stats->getValues( ) )[ i ]; + return( r ); + +} + +// ---------------------------------------------------------------------------- +void GetAreaValuesFromTotalVolume_dll( int xO, int yO, int zO, + int xF, int yF, int zF, + int* min, int* max, int* avg, + int* sd, int* size ) +{ + kVolumeStat* stats = new kVolumeStat( MyMaracasData._dicom->getVolume( ) ); + + stats->stats( xO, yO, zO, xF, yF, zF ); + + *min = ( int )stats->getMin( ); + *max = ( int )stats->getMax( ); + *avg = ( int )stats->getAvg( ); + *sd = ( int )stats->getSD( ); + *size = stats->getSize( ); + +} + +// ---------------------------------------------------------------------------- +bool SaveExperiment_dll ( std::string& fName ) +{ + return( MyMaracasData.saveExperiment( fName ) ); + +} + +// ---------------------------------------------------------------------------- +bool LoadExperiment_dll ( std::string& fName ) +{ + return( MyMaracasData.loadExperiment( fName ) ); + +} + +// ---------------------------------------------------------------------------- +void InitExperiment_dll ( int* voi ) +{ + MyMaracasData._experiment->setVOI( voi ); + MyMaracasData._experiment->initExperiment( MyMaracasData._dicom-> + getVolume( ) ); + //if( _ucharVol ) delete _ucharVol; + //_ucharVol = NULL; + MyMaracasData._dicom->freeVolume( ); +} + +// ---------------------------------------------------------------------------- +void SetStartPoint_dll( int x, int y, int z ) +{ + MyMaracasData._experiment->setStartPoint( x, y, z ); +} + +// ---------------------------------------------------------------------------- +void ExtractAxes_dll( ) +{ + MyMaracasData._experiment->extractVascularTree( ); +} + +// ---------------------------------------------------------------------------- +int GetNumberOfAxes_dll( ) +{ + return( MyMaracasData._experiment->getNumberOfAxes( ) ); +} + +// ---------------------------------------------------------------------------- +vtkPolyData* GetAllAxes_dll( ) +{ + int i, n, j; + double p[ marAxis::INDX_count ]; + marAxis* tmp; + + vtkPoints* allPoints = vtkPoints::New( ); + vtkCellArray* allTopology = vtkCellArray::New( ); + + j = 0; + for( n = 0; n < MyMaracasData._experiment->getNumberOfAxes( ); n++ ) { + + tmp = MyMaracasData._experiment->getAxis( ); + allTopology->InsertNextCell( tmp->getNumberOfControlPoints( ) ); + for( i = 0; i < tmp->getNumberOfControlPoints( ); i++ ) { + + tmp->getControlPoint( i, p, p + 3 ); + allPoints->InsertNextPoint( p[ 0 ], p[ 1 ], p[ 2 ] ); + allTopology->InsertCellPoint( j ); + j++; + + } // rof + + } // rof + + vtkPolyData* allData = vtkPolyData::New( ); + allData->SetPoints( allPoints ); + allData->SetLines( allTopology ); + + allPoints->Delete(); + allTopology->Delete(); + + return( allData ); + +} + +// ---------------------------------------------------------------------------- +vtkPolyData* GetActualAxis_dll( ) +{ + int i, j, h; + double p[ marAxis::INDX_count ]; + marAxis* tmp; + + vtkPoints* points = vtkPoints::New( ); + vtkCellArray* topology = vtkCellArray::New( ); + + j = 0; + h = MyMaracasData._experiment->getDynData( )->getVolume( )->getYdim( ); + tmp = MyMaracasData._experiment->getAxis( ); + topology->InsertNextCell( tmp->getNumberOfControlPoints( ) ); + for( i = 0; i < tmp->getNumberOfControlPoints( ); i++ ) { + + tmp->getControlPoint( i, p, p + 3 ); + topology->InsertCellPoint( j++ ); + points->InsertNextPoint( p[ 0 ], h - 1 - p[ 1 ], p[ 2 ] ); + + } // rof + + vtkPolyData* data = vtkPolyData::New( ); + data->SetPoints( points ); + data->SetLines( topology ); + + points->Delete(); + topology->Delete(); + + return( data ); +} + +// ---------------------------------------------------------------------------- +int GetActualAxisNumberOfPoints_dll( ) +{ + return( MyMaracasData._experiment->getAxis( )->getNumberOfControlPoints( ) ); + +} + +// ---------------------------------------------------------------------------- +double* GetActualAxisPoint_dll( int i ) +{ + double* ret = new double[ marAxis::INDX_count + 1 ]; + + ret[ 0 ] = marAxis::INDX_count; + MyMaracasData._experiment->getAxis( )->getControlPoint( i, ret + 1, ret + 4 ); + return( ret ); +} + +// ---------------------------------------------------------------------------- +vtkImageData* GetActualAxisSlice_dll( int i ) +{ + // return( MyMaracasData._experiment->GetSliceImage( i ) ); + return( NULL ); + +} + +// ---------------------------------------------------------------------------- +void PrepareQuantification_dll( int i ) +{ + /* + MyMaracasData._experiment->SetAxis( i ); + MyMaracasData._experiment->PrepareQuantification( ); + */ +} + +// ---------------------------------------------------------------------------- +double GetAxisLength_dll( ) +{ + return( MyMaracasData._experiment->getAxis( )->length( ) ); + +} + +// ---------------------------------------------------------------------------- +void GetImageRange_dll( int* min, int* max ) +{ + double m, M; + + MyMaracasData._experiment->getDynData( )->getVolume( )->getMinMax( m, M ); + *min = ( int )m; + *max = ( int )M; + +} + +// ---------------------------------------------------------------------------- +vtkImageData* GetVTKVolume_dll( ) +{ + return( MyMaracasData._experiment->getDynData( )->getVolume( )->castVtk( ) ); + +} + +// ---------------------------------------------------------------------------- +int IntersectWithLine_dll( + vtkCellLocator* iCellLocator, + double x1, double y1, double z1, + double x2, double y2, double z2, + double tol, double *xI, double *yI, double *zI + ) +{ + float a0[ 3 ], a1[ 3 ], x[ 3 ], t, pcoords[ 3 ]; + int subId; + + int returnVal; + + iCellLocator->Update( ); + + a0[ 0 ] = x1; a0[ 1 ] = y1; a0[ 2 ] = z1; + a1[ 0 ] = x2; a1[ 1 ] = y2; a1[ 2 ] = z2; + + returnVal = iCellLocator->IntersectWithLine( a0, a1, tol, t, x, pcoords, subId ); + ( *xI ) = x[ 0 ]; ( *yI ) = x[ 1 ]; ( *zI ) = x[ 2 ]; + + return( returnVal ); +} + +// ---------------------------------------------------------------------------- +void TclPerpendiculars_dll( + double xN, double yN, double zN, double angle, + double *xP1, double *yP1, double *zP1, + double *xP2, double *yP2, double *zP2 + ) +{ + double x[ 3 ], y[ 3 ], z[ 3 ]; + vtkMath* math; + + x[ 0 ] = xN; x[ 1 ] = yN; x[ 2 ] = zN; + math = vtkMath::New( ); + math->Perpendiculars( x, y, z,angle ); + ( *xP1 ) = y[ 0 ]; ( *yP1 ) = y[ 1 ]; ( *zP1 ) = y[ 2 ]; + ( *xP2 ) = z[ 0 ]; ( *yP2 ) = z[ 1 ]; ( *zP2 ) = z[ 2 ]; + math->Delete( ); +} + +#endif // MAR__INTERFACE__TCL__HXX + +// EOF - interfaceTCL.hxx diff --git a/lib/maracasVisuLib/src/interface/tcl/maracas_start.tcl b/lib/maracasVisuLib/src/interface/tcl/maracas_start.tcl new file mode 100644 index 0000000..bf46cde --- /dev/null +++ b/lib/maracasVisuLib/src/interface/tcl/maracas_start.tcl @@ -0,0 +1,42 @@ +# Tcl/Tk code loading +source ./general.tcl +source ./string_table.tcl +source ./tkwidgets/combobox.tcl +source ./tkwidgets/mclistbox.tcl +source ./tkwidgets/ibrowser.tcl +source ./tkwidgets/imagepp.tcl +#source ./to_change/vtkInt.tcl +source ./to_change/WidgetObject.tcl +source ./to_change/volTkInteractor.tcl +source ./to_change/TkImageViewerInteractor.tcl +source ./to_change/ev_userzoom.tcl +source ./windows/to_change/wizardpostcontour.tcl +source ./windows/to_change/wizardpostaxis.tcl +source ./windows/dlg_name_axis.tcl +source ./windows/help_wnd.tcl +source ./windows/subtract.tcl +source ./windows/choose_direction.tcl +source ./windows/dlg_params.tcl +source ./windows/global_window.tcl +source ./windows/data_browser.tcl +source ./windows/image_browser.tcl +source ./windows/u_3D.tcl +source ./windows/u_mpr.tcl +source ./windows/u_mip.tcl +source ./windows/u_surf.tcl +source ./windows/planes_window.tcl + +# Package invocation +package require vtk +package require BLT + +# Namespace includes +catch { namespace import blt::* } +catch { namespace import data_model::* } +catch { namespace import data_browser::* } +catch { namespace import global_window::* } + +# Start maracas +global_window::show ../icons + +# eof - maracas_start.tcl diff --git a/lib/maracasVisuLib/src/interface/tcl/string_table.tcl b/lib/maracasVisuLib/src/interface/tcl/string_table.tcl new file mode 100644 index 0000000..19b7191 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/tcl/string_table.tcl @@ -0,0 +1,185 @@ + +namespace eval string_table { + + variable str_3D_back_color {3D world background color:} + variable str_accept_changes {Accept changes?} + variable str_algorithm {Algorithm} + variable str_all_slices_selected {All slices selected by default?} + variable str_area {Area} + variable str_avg {Average} + variable str_axial {Axial} + variable str_axis {Axis} + variable str_axis_color {Axis color:} + variable str_axis_step {Axis discret step (1/N):} + variable str_bright {bright} + variable str_browse {Browse...} + variable str_calculate_mip_default {Calculate MIP default?} + variable str_calculated {Contour calculated} + variable str_cancel {Cancel} + variable str_choose_a_file {Choose a file} + variable str_choose_order {Choose order} + variable str_chooseadirectory {chooseadirectory} + variable str_choose_a_name {Choose a name...} + variable str_clean {clean} + variable str_clean_contours {Recalculate contours} + variable str_coef_ballon {Ballon coeficient:} + variable str_coef_cell {Cell coeficient:} + variable str_coef_flex {Flexion coeficient:} + variable str_coef_extern {Extern coeficient:} + variable str_coef_grad {Gradient coeficient:} + variable str_coef_pas {Step coeficient (1/N):} + variable str_coef_tension {Tension coeficient:} + variable str_color {Color} + variable str_colormap {Colormap} + variable str_console_window_visible {Console window visible?} + variable str_contour {Contour} + variable str_coronal {Coronal} + variable str_data_types {data types} + variable str_debug {Debug} + variable str_debug_window_visible {Debug window visible?} + variable str_delta {Delta:} + variable str_description {Description} + variable str_diam_area {Diameter from area} + variable str_diam_avg {Average diameter} + variable str_diam_max {Maximum diameter} + variable str_diam_min {Minimum diameter} + variable str_diam_peri {Diameter from perimeter} + variable str_diameters {Diameters} + variable str_dim_voxel_x {Dimension VXx:} + variable str_dim_voxel_y {Dimension VXy:} + variable str_dim_voxel_z {Dimension VXz:} + variable str_directories {Configure Directories} + variable str_dist_int {Distance max. int:} + variable str_distance {Distance:} + variable str_distance_cdg {Distance cdg:} + variable str_edge {edge} + variable str_edge_points {Edge points} + variable str_erase_extracted_contours {Delete extracted contours?} + variable str_erase_quant {Delete quantification} + variable str_erase_quant_q {Delete all quantification?} + variable str_filled_contour {Filled contour} + variable str_general {General} + variable str_generate_new_axis {Generate a new axis?} + variable str_green_red {green red} + variable str_greyscale {Greyscale} + variable str_healthy_slice {Healthy slice} + variable str_if_name_exists_will_erase {This name already exists. Remplace it?} + variable str_images_directory {DICOM Images Directory:} + variable str_institution {Institution} + variable str_int {Intensity} + variable str_interpolation_type {Interpolation type} + variable str_isocontour {IsoContour} + variable str_isocontours {IsoContours} + variable str_isoval {isoval} + variable str_isovalue {isovalue} + variable str_iter {No. iterations:} + variable str_maracas_title {MARACAS - MAgnetic Resonance Angiography Computer ASsisted analysis} + variable str_mask_size {Mask size:} + variable str_mass_power {Mass power:} + variable str_max {Maximum} + variable str_min {Minimum} + variable str_mip {MIP} + variable str_mip_controls {MIP controls} + variable str_mm_length {Length(mm)} + variable str_mpr_controls {MPR controls} + variable str_mpr_type {MPR type} + variable str_near_neighbor {Near neighbor} + variable str_new_axis_name {New axis name:} + variable str_no_name_choose_yet {No name choose yet!} + variable str_nro_pix {Number of pixels} + variable str_ok {Ok} + variable str_opacity {Opacity} + variable str_opaque {Opaque} + variable str_partial_axis_delete {partial axis delete} + variable str_patient_id {Patient ID} + variable str_patient_name {Patient Name} + variable str_pause {Pause} + variable str_peri {Perimeter} + variable str_perpendicular_section {Perpendicular section} + variable str_play {Play} + variable str_please_select_a_different_point {please select a different point} + variable str_please_select_a_point {please select a point} + variable str_quantification {Quantification} + variable str_quant_will_be_erased {Quantification will be erased} + variable str_rec_surface {Reconstructed surface} + variable str_recalculate_contours {Recalculate any contour?} + variable str_red_blue {red blue} + variable str_refresh {Refresh} + variable str_rings_visible {Visible rings} + variable str_roi_dim {ROI dimension:} + variable str_sagital {Sagital} + variable str_sample {Sample:} + variable str_scale {Scale:} + variable str_select_the_segment_to_delete {select the segment to delete} + variable str_serie {Serie} + variable str_serie_bodypart {Body Part} + variable str_serie_date {Date} + variable str_serie_description {Description} + variable str_serie_diagnostic {Diagnostic} + variable str_serie_modality {Modality} + variable str_serie_name {Name} + variable str_serie_number {Number} + variable str_serie_time {Time} + variable str_series {Series} + variable str_showtype {Show type:} + variable str_show_surf {Show surface} + variable str_sigma {Sigma:} + variable str_slice {Slice} + variable str_slices {Slices} + variable str_snake {Snake} + variable str_snake_der {Snake + Deriche} + variable str_snake_iso {Snake + IsoContour} + variable str_std {Standard deviation} + variable str_stenosis_type {Stenosis type} + variable str_stenosis {Stenosis} + variable str_step {Step:} + variable str_stop_quantification {Stop quantification?} + variable str_study_date {Study Date} + variable str_study_id {Study ID} + variable str_study_name {Study Name} + variable str_study_time {Study Time} + variable str_subtract_series {subtract series} + variable str_sure_to_stop {sure to stop \n(stop/pause/continue)} + variable str_surface {Surface} + variable str_surface_color {Surface color:} + variable str_surface_values {Surface values} + variable str_threshold {Threshold:} + variable str_title_params {Parameters for MARACAS...} + variable str_transparent {Transparent} + variable str_trilinear {Trilinear} + variable str_user_defined {User configuration} + variable str_work_directory {Work Directory:} + variable str_renal {Renal} + variable str_aorta {Aorta} + variable str_carotid {Carotid} + variable str_llimbs {Lower Limbs} + variable str_yes {Yes} + variable str_no {No} + + variable str_postcontour_wizard {Post-Contour Wizard...} + + variable str_postaxis_wizard {Post-Axis Wizard...} + variable str_artery_types {Artery types} + variable str_questions {Questions} + variable str_other {Other} + variable str_correct_result {Correct results?} + variable str_out_of_lumen {Out of lumen?} + variable str_not_centered {Not centered?} + variable str_zig_zag_axis {Zig-zag axis?} + variable str_out_of_bifurcation {Out of bifurcation?} + variable str_out_of_curve {Out of curve?} + variable str_jump_to_vein {Jump to vein?} + variable str_overestimated {Over-estimated?} + variable str_underestimated {Under-estimated?} + variable str_extraconcave {Extraconcave?} + variable str_more_than_one_artery {More than one artery?} + variable str_minimum_voxel {Minimum voxel} + variable str_normal_voxel {Normal voxel} + + variable str_coef_cell_max_int {Cell Max. Int. Coef (1/N):} + variable str_show_cell {Show cell?} + variable str_show_i_cell {Show intensity cell?} + +} + +# EOF - string_table.tcl diff --git a/lib/maracasVisuLib/src/interface/tcl/tclexe.dsp b/lib/maracasVisuLib/src/interface/tcl/tclexe.dsp new file mode 100644 index 0000000..1ad8785 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/tcl/tclexe.dsp @@ -0,0 +1,241 @@ +# Microsoft Developer Studio Project File - Name="tclexe" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=tclexe - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tclexe.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tclexe.mak" CFG="tclexe - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tclexe - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "tclexe - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tclexe - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "../bin" +# PROP Intermediate_Dir "tmp" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /u /D "NDEBUG" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 /nodefaultlib /out:"./maracas.exe" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Installing... +PostBuild_Cmds=copy *.exe C:\Users\Florez\local\bin +# End Special Build Tool + +!ELSEIF "$(CFG)" == "tclexe - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "../bin" +# PROP Intermediate_Dir "tmp" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /u /D "_DEBUG" /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib /out:"./maracas.exe" /pdbtype:sept +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Installing... +PostBuild_Cmds=copy *.exe C:\Users\Florez\local\bin +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "tclexe - Win32 Release" +# Name "tclexe - Win32 Debug" +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Group "Tcl Files" + +# PROP Default_Filter "" +# Begin Group "tkwidgets" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\tkwidgets\combobox.tcl +# End Source File +# Begin Source File + +SOURCE=.\tkwidgets\ibrowser.tcl +# End Source File +# Begin Source File + +SOURCE=.\tkwidgets\imagepp.tcl +# End Source File +# Begin Source File + +SOURCE=.\tkwidgets\mclistbox.tcl +# End Source File +# End Group +# Begin Group "to_change" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\to_change\ev_userzoom.tcl +# End Source File +# Begin Source File + +SOURCE=.\to_change\TkImageViewerInteractor.tcl +# End Source File +# Begin Source File + +SOURCE=.\to_change\TkInteractor.tcl +# End Source File +# Begin Source File + +SOURCE=.\to_change\volTkInteractor.tcl +# End Source File +# Begin Source File + +SOURCE=.\to_change\vtkInt.tcl +# End Source File +# Begin Source File + +SOURCE=.\to_change\WidgetObject.tcl +# End Source File +# End Group +# Begin Group "windows" + +# PROP Default_Filter "" +# Begin Group "to_change No. 1" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\windows\to_change\wizardpostaxis.tcl +# End Source File +# Begin Source File + +SOURCE=.\windows\to_change\wizardpostcontour.tcl +# End Source File +# End Group +# Begin Source File + +SOURCE=.\windows\choose_direction.tcl +# End Source File +# Begin Source File + +SOURCE=.\windows\data_browser.tcl +# End Source File +# Begin Source File + +SOURCE=.\windows\dlg_name_axis.tcl +# End Source File +# Begin Source File + +SOURCE=.\windows\dlg_params.tcl +# End Source File +# Begin Source File + +SOURCE=.\windows\global_window.tcl +# End Source File +# Begin Source File + +SOURCE=.\windows\help_wnd.tcl +# End Source File +# Begin Source File + +SOURCE=.\windows\image_browser.tcl +# End Source File +# Begin Source File + +SOURCE=.\windows\planes_window.tcl +# End Source File +# Begin Source File + +SOURCE=.\windows\subtract.tcl +# End Source File +# Begin Source File + +SOURCE=.\windows\u_3D.tcl +# End Source File +# Begin Source File + +SOURCE=.\windows\u_mip.tcl +# End Source File +# Begin Source File + +SOURCE=.\windows\u_mpr.tcl +# End Source File +# Begin Source File + +SOURCE=.\windows\u_surf.tcl +# End Source File +# End Group +# Begin Source File + +SOURCE=.\general.tcl +# End Source File +# Begin Source File + +SOURCE=.\maracas_start.tcl +# End Source File +# Begin Source File + +SOURCE=.\maracas_w32.tcl +# End Source File +# Begin Source File + +SOURCE=.\string_table.tcl +# End Source File +# End Group +# End Target +# End Project diff --git a/lib/maracasVisuLib/src/interface/tcl/tkwidgets/Makefile.am b/lib/maracasVisuLib/src/interface/tcl/tkwidgets/Makefile.am new file mode 100644 index 0000000..4809fb3 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/tcl/tkwidgets/Makefile.am @@ -0,0 +1,9 @@ +## Makefile.am -- Process this file with automake to produce Makefile.in + +EXTRA_DIST = \ + combobox.tcl \ + ibrowser.tcl \ + imagepp.tcl \ + mclistbox.tcl + +## eof - Makefile.am diff --git a/lib/maracasVisuLib/src/interface/tcl/tkwidgets/Makefile.in b/lib/maracasVisuLib/src/interface/tcl/tkwidgets/Makefile.in new file mode 100644 index 0000000..6705062 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/tcl/tkwidgets/Makefile.in @@ -0,0 +1,224 @@ +# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am + +# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + +SHELL = @SHELL@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ +oldincludedir = /usr/include + +DESTDIR = + +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ + +top_builddir = ../.. + +ACLOCAL = @ACLOCAL@ +AUTOCONF = @AUTOCONF@ +AUTOMAKE = @AUTOMAKE@ +AUTOHEADER = @AUTOHEADER@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +transform = @program_transform_name@ + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +host_alias = @host_alias@ +host_triplet = @host@ +AS = @AS@ +CC = @CC@ +CFLAGS_DEBUG = @CFLAGS_DEBUG@ +CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@ +CFLAGS_WARNING = @CFLAGS_WARNING@ +CPP = @CPP@ +CXX = @CXX@ +DLLTOOL = @DLLTOOL@ +DL_LIBS = @DL_LIBS@ +ECHO = @ECHO@ +EXEEXT = @EXEEXT@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_CONFIG = @GSL_CONFIG@ +GSL_LIBS = @GSL_LIBS@ +IDO_CFLAGS = @IDO_CFLAGS@ +IDO_LIBS = @IDO_LIBS@ +KGFO_CFLAGS = @KGFO_CFLAGS@ +KGFO_CONFIG = @KGFO_CONFIG@ +KGFO_LIBS = @KGFO_LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +MAKEINFO = @MAKEINFO@ +MARACAS_ALGORITHM_VER = @MARACAS_ALGORITHM_VER@ +MARACAS_ALGORITHM_VER_STR = @MARACAS_ALGORITHM_VER_STR@ +MARACAS_KERNEL_VER = @MARACAS_KERNEL_VER@ +MARACAS_KERNEL_VER_STR = @MARACAS_KERNEL_VER_STR@ +MARACAS_TCL_VER = @MARACAS_TCL_VER@ +MARACAS_TCL_VER_STR = @MARACAS_TCL_VER_STR@ +MARACAS_VER = @MARACAS_VER@ +MARACAS_VER_STR = @MARACAS_VER_STR@ +MATH_LIBS = @MATH_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +RANLIB = @RANLIB@ +STRIP = @STRIP@ +TCLTK_LIBS = @TCLTK_LIBS@ +TCL_BIN_DIR = @TCL_BIN_DIR@ +TCL_INC_DIR = @TCL_INC_DIR@ +TCL_LIBS = @TCL_LIBS@ +TCL_LIB_FILE = @TCL_LIB_FILE@ +TCL_SRC_DIR = @TCL_SRC_DIR@ +TK_BIN_DIR = @TK_BIN_DIR@ +TK_INC_DIR = @TK_INC_DIR@ +TK_LIB_FILE = @TK_LIB_FILE@ +TK_SRC_DIR = @TK_SRC_DIR@ +VERSION = @VERSION@ +VTK_CFLAGS = @VTK_CFLAGS@ +VTK_LIBS = @VTK_LIBS@ +WX_CFLAGS = @WX_CFLAGS@ +WX_CONFIG = @WX_CONFIG@ +WX_LIBS = @WX_LIBS@ + +EXTRA_DIST = combobox.tcl ibrowser.tcl imagepp.tcl mclistbox.tcl + +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = ../../config.h +CONFIG_CLEAN_FILES = +DIST_COMMON = Makefile.am Makefile.in + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = tar +GZIP_ENV = --best +all: all-redirect +.SUFFIXES: +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu tcl/tkwidgets/Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + +tags: TAGS +TAGS: + + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) + +subdir = tcl/tkwidgets + +distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu tcl/tkwidgets/Makefile + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ + cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done +info-am: +info: info-am +dvi-am: +dvi: dvi-am +check-am: all-am +check: check-am +installcheck-am: +installcheck: installcheck-am +install-exec-am: +install-exec: install-exec-am + +install-data-am: +install-data: install-data-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-am +uninstall-am: +uninstall: uninstall-am +all-am: Makefile +all-redirect: all-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: + + +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + +maintainer-clean-generic: +mostlyclean-am: mostlyclean-generic + +mostlyclean: mostlyclean-am + +clean-am: clean-generic mostlyclean-am + +clean: clean-am + +distclean-am: distclean-generic clean-am + -rm -f libtool + +distclean: distclean-am + +maintainer-clean-am: maintainer-clean-generic distclean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +maintainer-clean: maintainer-clean-am + +.PHONY: tags distdir info-am info dvi-am dvi check check-am \ +installcheck-am installcheck install-exec-am install-exec \ +install-data-am install-data install-am install uninstall-am uninstall \ +all-redirect all-am all installdirs mostlyclean-generic \ +distclean-generic clean-generic maintainer-clean-generic clean \ +mostlyclean distclean maintainer-clean + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/lib/maracasVisuLib/src/interface/tcl/tkwidgets/combobox.tcl b/lib/maracasVisuLib/src/interface/tcl/tkwidgets/combobox.tcl new file mode 100644 index 0000000..4f008e3 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/tcl/tkwidgets/combobox.tcl @@ -0,0 +1,1989 @@ +# Copyright (c) 1998-1999, Bryan Oakley +# All Rights Reservered +# +# Bryan Oakley +# oakley@channelpoint.com +# +# combobox v2.0b2 April 14, 1999 +# +# a combobox / dropdown listbox (pick your favorite name) widget +# written in pure tcl +# +# this code is freely distributable without restriction, but is +# provided as-is with no waranty expressed or implied. +# +# thanks to the following people who provided beta test support or +# patches to the code (in no particular order): +# +# Scott Beasley Alexandre Ferrieux Todd Helfter +# Matt Gushee Laurent Duperval John Jackson +# Fred Rapp Christopher Nelson +# Eric Galluzzo Jean-Francois Moine + +# A special thanks to Martin M. Hunt who provided several good ideas, +# and always with a patch to implement them. Jean-Francois Moine, +# Todd Helfter and John Jackson were also kind enough to send in some +# code patches. + +package require Tk 8.0 +package provide combobox 2.0 + +namespace eval ::combobox { + + # this is the public interface + namespace export combobox + + # these contain references to available options + variable widgetOptions + + # these contain references to available commands and subcommands + variable widgetCommands + variable scanCommands + variable listCommands + +} + +# ::combobox::combobox -- +# +# This is the command that gets exported. It creates a new +# combobox widget. +# +# Arguments: +# +# w path of new widget to create +# args additional option/value pairs (eg: -background white, etc.) +# +# Results: +# +# It creates the widget and sets up all of the default bindings +# +# Returns: +# +# The name of the newly create widget + +proc ::combobox::combobox {w args} { + variable widgetOptions + variable widgetCommands + variable scanCommands + variable listCommands + + # perform a one time initialization + if {![info exists widgetOptions]} { + Init + } + + # build it... + eval Build $w $args + + # set some bindings... + SetBindings $w + + # and we are done! + return $w +} + + +# ::combobox::Init -- +# +# Initialize the global (well, namespace) variables. This should +# only be called once, immediately prior to creating the first +# instance of the widget +# +# Arguments: +# +# none +# +# Results: +# +# All state variables are set to their default values; all of +# the option database entries will exist. +# +# Returns: +# +# empty string + +proc ::combobox::Init {} { + variable widgetOptions + variable widgetCommands + variable scanCommands + variable listCommands + variable defaultEntryCursor + + array set widgetOptions [list \ + -background {background Background} \ + -bd -borderwidth \ + -bg -background \ + -borderwidth {borderWidth BorderWidth} \ + -command {command Command} \ + -commandstate {commandState State} \ + -cursor {cursor Cursor} \ + -editable {editable Editable} \ + -fg -foreground \ + -font {font Font} \ + -foreground {foreground Foreground} \ + -height {height Height} \ + -highlightbackground {highlightBackground HighlightBackground} \ + -highlightcolor {highlightColor HighlightColor} \ + -highlightthickness {highlightThickness HighlightThickness} \ + -image {image Image} \ + -maxheight {maxHeight Height} \ + -relief {relief Relief} \ + -selectbackground {selectBackground Foreground} \ + -selectborderwidth {selectBorderWidth BorderWidth} \ + -selectforeground {selectForeground Background} \ + -state {state State} \ + -takefocus {takeFocus TakeFocus} \ + -textvariable {textVariable Variable} \ + -value {value Value} \ + -width {width Width} \ + -xscrollcommand {xScrollCommand ScrollCommand} \ + ] + + + set widgetCommands [list \ + bbox cget configure curselection \ + delete get icursor index \ + insert list scan selection \ + xview select toggle open \ + close \ + ] + + set listCommands [list \ + delete get \ + index insert size \ + ] + + set scanCommands [list mark dragto] + + # why check for the Tk package? This lets us be sourced into + # an interpreter that doesn't have Tk loaded, such as the slave + # interpreter used by pkg_mkIndex. In theory it should have no + # side effects when run + if {[lsearch -exact [package names] "Tk"] != -1} { + + ################################################################## + #- this initializes the option database. Kinda gross, but it works + #- (I think). + ################################################################## + + # the image used for the button... + if {$::tcl_platform(platform) == "windows"} { + image create bitmap ::combobox::bimage -data { + #define down_arrow_width 12 + #define down_arrow_height 12 + static char down_arrow_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfc,0xf1,0xf8,0xf0,0x70,0xf0,0x20,0xf0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00; + } + } + } else { + image create bitmap ::combobox::bimage -data { + #define down_arrow_width 15 + #define down_arrow_height 15 + static char down_arrow_bits[] = { + 0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80, + 0x00,0x80,0xf8,0x8f,0xf0,0x87,0xe0,0x83, + 0xc0,0x81,0x80,0x80,0x00,0x80,0x00,0x80, + 0x00,0x80,0x00,0x80,0x00,0x80 + } + } + } + + # compute a widget name we can use to create a temporary widget + set tmpWidget ".__tmp__" + set count 0 + while {[winfo exists $tmpWidget] == 1} { + set tmpWidget ".__tmp__$count" + incr count + } + + # get the scrollbar width. Because we try to be clever and draw our + # own button instead of using a tk widget, we need to know what size + # button to create. This little hack tells us the width of a scroll + # bar. + # + # NB: we need to be sure and pick a window that doesn't already + # exist... + scrollbar $tmpWidget + set sb_width [winfo reqwidth $tmpWidget] + destroy $tmpWidget + + # steal options from the entry widget + # we want darn near all options, so we'll go ahead and do + # them all. No harm done in adding the one or two that we + # don't use. + entry $tmpWidget + foreach foo [$tmpWidget configure] { + # the cursor option is special, so we'll save it in + # a special way + if {[lindex $foo 0] == "-cursor"} { + set defaultEntryCursor [lindex $foo 4] + } + if {[llength $foo] == 5} { + set option [lindex $foo 1] + set value [lindex $foo 4] + option add *Combobox.$option $value widgetDefault + + # these options also apply to the dropdown listbox + if {[string compare $option "foreground"] == 0 \ + || [string compare $option "background"] == 0 \ + || [string compare $option "font"] == 0} { + option add *Combobox*ComboboxListbox.$option $value \ + widgetDefault + } + } + } + destroy $tmpWidget + + # these are unique to us... + option add *Combobox.cursor {} + option add *Combobox.commandState normal widgetDefault + option add *Combobox.editable 1 widgetDefault + option add *Combobox.maxHeight 10 widgetDefault + option add *Combobox.height 0 + } + + # set class bindings + SetClassBindings +} + +# ::combobox::SetClassBindings -- +# +# Sets up the default bindings for the widget class +# +# this proc exists since it's The Right Thing To Do, but +# I haven't had the time to figure out how to do all the +# binding stuff on a class level. The main problem is that +# the entry widget must have focus for the insertion cursor +# to be visible. So, I either have to have the entry widget +# have the Combobox bindtag, or do some fancy juggling of +# events or some such. What a pain. +# +# Arguments: +# +# none +# +# Returns: +# +# empty string + +proc ::combobox::SetClassBindings {} { + + # make sure we clean up after ourselves... + bind Combobox [list ::combobox::DestroyHandler %W] + + # this will (hopefully) close (and lose the grab on) the + # listbox if the user clicks anywhere outside of it. Note + # that on Windows, you can click on some other app and + # the listbox will still be there, because tcl won't see + # that button click + set this {[::combobox::convert %W -W]} + bind Combobox "$this close" + bind Combobox "$this close" + + # this helps (but doesn't fully solve) focus issues. The general + # idea is, whenever the frame gets focus it gets passed on to + # the entry widget + bind Combobox {tkTabToWindow [::combobox::convert %W -W].entry} + + # this closes the listbox if we get hidden + bind Combobox {[::combobox::convert %W -W] close} + + return "" +} + +# ::combobox::SetBindings -- +# +# here's where we do most of the binding foo. I think there's probably +# a few bindings I ought to add that I just haven't thought +# about... +# +# I'm not convinced these are the proper bindings. Ideally all +# bindings should be on "Combobox", but because of my juggling of +# bindtags I'm not convinced thats what I want to do. But, it all +# seems to work, its just not as robust as it could be. +# +# Arguments: +# +# w widget pathname +# +# Returns: +# +# empty string + +proc ::combobox::SetBindings {w} { + upvar ::combobox::${w}::widgets widgets + upvar ::combobox::${w}::options options + + # juggle the bindtags. The basic idea here is to associate the + # widget name with the entry widget, so if a user does a bind + # on the combobox it will get handled properly since it is + # the entry widget that has keyboard focus. + bindtags $widgets(entry) \ + [concat $widgets(this) [bindtags $widgets(entry)]] + + bindtags $widgets(button) \ + [concat $widgets(this) [bindtags $widgets(button)]] + + # override the default bindings for tab and shift-tab. The + # focus procs take a widget as their only parameter and we + # want to make sure the right window gets used (for shift- + # tab we want it to appear as if the event was generated + # on the frame rather than the entry. I + + bind $widgets(entry) \ + "tkTabToWindow \[tk_focusNext $widgets(entry)\]; break" + bind $widgets(entry) \ + "tkTabToWindow \[tk_focusPrev $widgets(this)\]; break" + + # this makes our "button" (which is actually a label) + # do the right thing + bind $widgets(button) [list $widgets(this) toggle] + + # this lets the autoscan of the listbox work, even if they + # move the cursor over the entry widget. + bind $widgets(entry) "break" + + bind $widgets(listbox) \ + "::combobox::Select $widgets(this) \[$widgets(listbox) nearest %y\]; break" + + bind $widgets(vsb) {continue} + bind $widgets(vsb) {continue} + + bind $widgets(listbox) { + %W selection clear 0 end + %W activate @%x,%y + %W selection anchor @%x,%y + %W selection set @%x,%y @%x,%y + # need to do a yview if the cursor goes off the top + # or bottom of the window... (or do we?) + } + + # these events need to be passed from the entry + # widget to the listbox, or need some sort of special + # handling.... + foreach event [list \ + <1> \ + ] { + bind $widgets(entry) $event \ + "::combobox::HandleEvent $widgets(this) $event" + } + +} + +# ::combobox::Build -- +# +# This does all of the work necessary to create the basic +# combobox. +# +# Arguments: +# +# w widget name +# args additional option/value pairs +# +# Results: +# +# Creates a new widget with the given name. Also creates a new +# namespace patterened after the widget name, as a child namespace +# to ::combobox +# +# Returns: +# +# the name of the widget + +proc ::combobox::Build {w args } { + variable widgetOptions + + if {[winfo exists $w]} { + error "window name \"$w\" already exists" + } + + # create the namespace for this instance, and define a few + # variables + namespace eval ::combobox::$w { + + variable ignoreTrace 0 + variable oldFocus {} + variable oldGrab {} + variable oldValue {} + variable options + variable this + variable widgets + + set widgets(foo) foo ;# coerce into an array + set options(foo) foo ;# coerce into an array + + unset widgets(foo) + unset options(foo) + } + + # import the widgets and options arrays into this proc so + # we don't have to use fully qualified names, which is a + # pain. + upvar ::combobox::${w}::widgets widgets + upvar ::combobox::${w}::options options + + # this is our widget -- a frame of class Combobox. Naturally, + # it will contain other widgets. We create it here because + # we need it to be able to set our default options. + set widgets(this) [frame $w -class Combobox -takefocus 0] + set widgets(entry) [entry $w.entry -takefocus 1] + set widgets(button) [label $w.button -takefocus 0] + + # this defines all of the default options. We get the + # values from the option database. Note that if an array + # value is a list of length one it is an alias to another + # option, so we just ignore it + foreach name [array names widgetOptions] { + if {[llength $widgetOptions($name)] == 1} continue + set optName [lindex $widgetOptions($name) 0] + set optClass [lindex $widgetOptions($name) 1] + set value [option get $w $optName $optClass] + set options($name) $value + } + + # if -value is set to null, we'll remove it from our + # local array. The assumption is, if the user sets it from + # the option database, they will set it to something other + # than null (since it's impossible to determine the difference + # between a null value and no value at all). + if {[info exists options(-value)] \ + && [string length $options(-value)] == 0} { + unset options(-value) + } + + # we will later rename the frame's widget proc to be our + # own custom widget proc. We need to keep track of this + # new name, so we'll define and store it here... + set widgets(frame) ::combobox::${w}::$w + + # gotta do this sooner or later. Might as well do it now + pack $widgets(entry) -side left -fill both -expand yes + pack $widgets(button) -side right -fill y -expand no + + # I should probably do this in a catch, but for now it's + # good enough... What it does, obviously, is put all of + # the option/values pairs into an array. Make them easier + # to handle later on... + array set options $args + + # now, the dropdown list... the same renaming nonsense + # must go on here as well... + set widgets(popup) [toplevel $w.top] + set widgets(listbox) [listbox $w.top.list] + set widgets(vsb) [scrollbar $w.top.vsb] + + pack $widgets(listbox) -side left -fill both -expand y + + # fine tune the widgets based on the options (and a few + # arbitrary values...) + + # NB: we are going to use the frame to handle the relief + # of the widget as a whole, so the entry widget will be + # flat. This makes the button which drops down the list + # to appear "inside" the entry widget. + + $widgets(vsb) configure \ + -command "$widgets(listbox) yview" \ + -highlightthickness 0 + + $widgets(button) configure \ + -highlightthickness 0 \ + -borderwidth 1 \ + -relief raised \ + -width [expr {[winfo reqwidth $widgets(vsb)] - 2}] + + $widgets(entry) configure \ + -borderwidth 0 \ + -relief flat \ + -highlightthickness 0 + + $widgets(popup) configure \ + -borderwidth 1 \ + -relief sunken + + $widgets(listbox) configure \ + -selectmode browse \ + -background [$widgets(entry) cget -bg] \ + -yscrollcommand "$widgets(vsb) set" \ + -exportselection false \ + -borderwidth 0 + + +# trace variable ::combobox::${w}::entryTextVariable w \ +# [list ::combobox::EntryTrace $w] + + # do some window management foo on the dropdown window + wm overrideredirect $widgets(popup) 1 + wm transient $widgets(popup) [winfo toplevel $w] + wm group $widgets(popup) [winfo parent $w] + wm resizable $widgets(popup) 0 0 + wm withdraw $widgets(popup) + + # this moves the original frame widget proc into our + # namespace and gives it a handy name + rename ::$w $widgets(frame) + + # now, create our widget proc. Obviously (?) it goes in + # the global namespace. All combobox widgets will actually + # share the same widget proc to cut down on the amount of + # bloat. + proc ::$w {command args} \ + "eval ::combobox::WidgetProc $w \$command \$args" + + + # ok, the thing exists... let's do a bit more configuration. + if {[catch "::combobox::Configure $widgets(this) [array get options]" error]} { + catch {destroy $w} + error $error + } + + return "" + +} + +# ::combobox::HandleEvent -- +# +# this proc handles events from the entry widget that we want +# handled specially (typically, to allow navigation of the list +# even though the focus is in the entry widget) +# +# Arguments: +# +# w widget pathname +# event a string representing the event (not necessarily an +# actual event) + +proc ::combobox::HandleEvent {w event} { + upvar ::combobox::${w}::widgets widgets + upvar ::combobox::${w}::options options + upvar ::combobox::${w}::oldValue oldValue + + # for all of these events, if we have a special action we'll + # do that and do a "return -code break" to keep additional + # bindings from firing. Otherwise we'll let the event fall + # on through. + switch $event { + + "" { + # if the widget is editable, clear the selection. + # this makes it more obvious what will happen if the + # user presses (and helps our code know what + # to do if the user presses return) + if {$options(-editable)} { + $widgets(listbox) see 0 + $widgets(listbox) selection clear 0 end + $widgets(listbox) selection anchor 0 + $widgets(listbox) activate 0 + } + } + + "" { + set oldValue [$widgets(entry) get] + } + + "" { + if {![winfo ismapped $widgets(popup)]} { + # did the value change? +# set newValue [set ::combobox::${w}::entryTextVariable] + set newValue [$widgets(entry) get] + if {$oldValue != $newValue} { + CallCommand $widgets(this) $newValue + } + } + } + + "<1>" { + set editable [::combobox::GetBoolean $options(-editable)] + if {!$editable} { + if {[winfo ismapped $widgets(popup)]} { + $widgets(this) close + return -code break; + + } else { + if {$options(-state) != "disabled"} { + $widgets(this) open + return -code break; + } + } + } + } + + "" { + if {$options(-state) != "disabled"} { + $widgets(this) toggle + return -code break; + } + } + + "" { + if {[winfo ismapped $widgets(popup)]} { + ::combobox::Find $widgets(this) 0 + return -code break; + } else { + ::combobox::SetValue $widgets(this) [$widgets(this) get] + } + } + + "" { +# $widgets(entry) delete 0 end +# $widgets(entry) insert 0 $oldValue + if {[winfo ismapped $widgets(popup)]} { + $widgets(this) close + return -code break; + } + } + + "" { + # did the value change? +# set newValue [set ::combobox::${w}::entryTextVariable] + set newValue [$widgets(entry) get] + if {$oldValue != $newValue} { + CallCommand $widgets(this) $newValue + } + + if {[winfo ismapped $widgets(popup)]} { + ::combobox::Select $widgets(this) \ + [$widgets(listbox) curselection] + return -code break; + } + + } + + "" { + $widgets(listbox) yview scroll 1 pages + set index [$widgets(listbox) index @0,0] + $widgets(listbox) see $index + $widgets(listbox) activate $index + $widgets(listbox) selection clear 0 end + $widgets(listbox) selection anchor $index + $widgets(listbox) selection set $index + + } + + "" { + $widgets(listbox) yview scroll -1 pages + set index [$widgets(listbox) index @0,0] + $widgets(listbox) activate $index + $widgets(listbox) see $index + $widgets(listbox) selection clear 0 end + $widgets(listbox) selection anchor $index + $widgets(listbox) selection set $index + } + + "" { + if {[winfo ismapped $widgets(popup)]} { + tkListboxUpDown $widgets(listbox) 1 + return -code break; + + } else { + if {$options(-state) != "disabled"} { + $widgets(this) open + return -code break; + } + } + } + "" { + if {[winfo ismapped $widgets(popup)]} { + tkListboxUpDown $widgets(listbox) -1 + return -code break; + + } else { + if {$options(-state) != "disabled"} { + $widgets(this) open + return -code break; + } + } + } + } + + return "" +} + +# ::combobox::DestroyHandler {w} -- +# +# Cleans up after a combobox widget is destroyed +# +# Arguments: +# +# w widget pathname +# +# Results: +# +# The namespace that was created for the widget is deleted, +# and the widget proc is removed. + +proc ::combobox::DestroyHandler {w} { + + # if the widget actually being destroyed is of class Combobox, + # crush the namespace and kill the proc. Get it? Crush. Kill. + # Destroy. Heh. Danger Will Robinson! Oh, man! I'm so funny it + # brings tears to my eyes. + if {[string compare [winfo class $w] "Combobox"] == 0} { + upvar ::combobox::${w}::widgets widgets + upvar ::combobox::${w}::options options + + # delete the namespace and the proc which represents + # our widget + namespace delete ::combobox::$w + rename $w {} + } + + return "" +} + +# ::combobox::Find +# +# finds something in the listbox that matches the pattern in the +# entry widget and selects it +# +# N.B. I'm not convinced this is working the way it ought to. It +# works, but is the behavior what is expected? I've also got a gut +# feeling that there's a better way to do this, but I'm too lazy to +# figure it out... +# +# Arguments: +# +# w widget pathname +# exact boolean; if true an exact match is desired +# +# Returns: +# +# Empty string + +proc ::combobox::Find {w {exact 0}} { + upvar ::combobox::${w}::widgets widgets + upvar ::combobox::${w}::options options + + ## *sigh* this logic is rather gross and convoluted. Surely + ## there is a more simple, straight-forward way to implement + ## all this. As the saying goes, I lack the time to make it + ## shorter... + + # use what is already in the entry widget as a pattern + set pattern [$widgets(entry) get] + + if {[string length $pattern] == 0} { + # clear the current selection + $widgets(listbox) see 0 + $widgets(listbox) selection clear 0 end + $widgets(listbox) selection anchor 0 + $widgets(listbox) activate 0 + return + } + + # we're going to be searching this list... + set list [$widgets(listbox) get 0 end] + + # if we are doing an exact match, try to find, + # well, an exact match + set exactMatch -1 + if {$exact} { + set exactMatch [lsearch -exact $list $pattern] + } + + # search for it. We'll try to be clever and not only + # search for a match for what they typed, but a match for + # something close to what they typed. We'll keep removing one + # character at a time from the pattern until we find a match + # of some sort. + set index -1 + while {$index == -1 && [string length $pattern]} { + set index [lsearch -glob $list "$pattern*"] + if {$index == -1} { + regsub {.$} $pattern {} pattern + } + } + + # this is the item that most closely matches... + set thisItem [lindex $list $index] + + # did we find a match? If so, do some additional munging... + if {$index != -1} { + + # we need to find the part of the first item that is + # unique WRT the second... I know there's probably a + # simpler way to do this... + + set nextIndex [expr {$index + 1}] + set nextItem [lindex $list $nextIndex] + + # we don't really need to do much if the next + # item doesn't match our pattern... + if {[string match $pattern* $nextItem]} { + # ok, the next item matches our pattern, too + # now the trick is to find the first character + # where they *don't* match... + set marker [string length $pattern] + while {$marker <= [string length $pattern]} { + set a [string index $thisItem $marker] + set b [string index $nextItem $marker] + if {[string compare $a $b] == 0} { + append pattern $a + incr marker + } else { + break + } + } + } else { + set marker [string length $pattern] + } + + } else { + set marker end + set index 0 + } + + # ok, we know the pattern and what part is unique; + # update the entry widget and listbox appropriately + if {$exact && $exactMatch == -1} { + # this means we didn't find an exact match + $widgets(listbox) selection clear 0 end + $widgets(listbox) see $index + + } elseif {!$exact} { + # this means we found something, but it isn't an exact + # match. If we find something that *is* an exact match we + # don't need to do the following, since it would merely + # be replacing the data in the entry widget with itself + set oldstate [$widgets(entry) cget -state] + $widgets(entry) configure -state normal + $widgets(entry) delete 0 end + $widgets(entry) insert end $thisItem + $widgets(entry) selection clear + $widgets(entry) selection range $marker end + $widgets(listbox) activate $index + $widgets(listbox) selection clear 0 end + $widgets(listbox) selection anchor $index + $widgets(listbox) selection set $index + $widgets(listbox) see $index + $widgets(entry) configure -state $oldstate + } +} + +# ::combobox::Select -- +# +# selects an item from the list and sets the value of the combobox +# to that value +# +# Arguments: +# +# w widget pathname +# index listbox index of item to be selected +# +# Returns: +# +# empty string + +proc ::combobox::Select {w index} { + upvar ::combobox::${w}::widgets widgets + upvar ::combobox::${w}::options options + + catch { + set data [$widgets(listbox) get [lindex $index 0]] + ::combobox::SetValue $widgets(this) $data + + $widgets(listbox) selection clear 0 end + $widgets(listbox) selection anchor $index + $widgets(listbox) selection set $index + + $widgets(entry) selection range 0 end + } + + $widgets(this) close + + return "" +} + +# ::combobox::HandleScrollbar -- +# +# causes the scrollbar of the dropdown list to appear or disappear +# based on the contents of the dropdown listbox +# +# Arguments: +# +# w widget pathname +# action the action to perform on the scrollbar +# +# Returns: +# +# an empty string + +proc ::combobox::HandleScrollbar {w {action "unknown"}} { + upvar ::combobox::${w}::widgets widgets + upvar ::combobox::${w}::options options + + if {$options(-height) == 0} { + set hlimit $options(-maxheight) + } else { + set hlimit $options(-height) + } + + switch $action { + "grow" { + if {$hlimit > 0 && [$widgets(listbox) size] > $hlimit} { + pack $widgets(vsb) -side right -fill y -expand n + } + } + + "shrink" { + if {$hlimit > 0 && [$widgets(listbox) size] <= $hlimit} { + pack forget $widgets(vsb) + } + } + + "crop" { + # this means the window was cropped and we definitely + # need a scrollbar no matter what the user wants + pack $widgets(vsb) -side right -fill y -expand n + } + + default { + if {$hlimit > 0 && [$widgets(listbox) size] > $hlimit} { + pack $widgets(vsb) -side right -fill y -expand n + } else { + pack forget $widgets(vsb) + } + } + } + + return "" +} + +# ::combobox::ComputeGeometry -- +# +# computes the geometry of the popup list based on the size of the +# combobox... +# +# Arguments: +# +# w widget pathname +# +# Returns: +# +# the desired geometry of the listbox + +proc ::combobox::ComputeGeometry {w} { + upvar ::combobox::${w}::widgets widgets + upvar ::combobox::${w}::options options + + if {$options(-height) == 0 && $options(-maxheight) != "0"} { + # if this is the case, count the items and see if + # it exceeds our maxheight. If so, set the listbox + # size to maxheight... + set nitems [$widgets(listbox) size] + if {$nitems > $options(-maxheight)} { + # tweak the height of the listbox + $widgets(listbox) configure -height $options(-maxheight) + } else { + # un-tweak the height of the listbox + $widgets(listbox) configure -height 0 + } + update idletasks + } + + # compute height and width of the dropdown list + set bd [$widgets(popup) cget -borderwidth] + set height [expr {[winfo reqheight $widgets(popup)] + $bd + $bd}] + set width [winfo width $widgets(this)] + + # figure out where to place it on the screen, trying to take into + # account we may be running under some virtual window manager + set screenWidth [winfo screenwidth $widgets(this)] + set screenHeight [winfo screenheight $widgets(this)] + set rootx [winfo rootx $widgets(this)] + set rooty [winfo rooty $widgets(this)] + set vrootx [winfo vrootx $widgets(this)] + set vrooty [winfo vrooty $widgets(this)] + + # the x coordinate is simply the rootx of our widget, adjusted for + # the virtual window. We won't worry about whether the window will + # be offscreen to the left or right -- we want the illusion that it + # is part of the entry widget, so if part of the entry widget is off- + # screen, so will the list. If you want to change the behavior, + # simply change the if statement... (and be sure to update this + # comment!) + set x [expr {$rootx + $vrootx}] + if {0} { + set rightEdge [expr {$x + $width}] + if {$rightEdge > $screenWidth} { + set x [expr {$screenWidth - $width}] + } + if {$x < 0} {set x 0} + } + + # the y coordinate is the rooty plus vrooty offset plus + # the height of the static part of the widget plus 1 for a + # tiny bit of visual separation... + set y [expr {$rooty + $vrooty + [winfo reqheight $widgets(this)] + 1}] + set bottomEdge [expr {$y + $height}] + + if {$bottomEdge >= $screenHeight} { + # ok. Fine. Pop it up above the entry widget isntead of + # below. + set y [expr {($rooty - $height - 1) + $vrooty}] + + if {$y < 0} { + # this means it extends beyond our screen. How annoying. + # Now we'll try to be real clever and either pop it up or + # down, depending on which way gives us the biggest list. + # then, we'll trim the list to fit and force the use of + # a scrollbar + + # (sadly, for windows users this measurement doesn't + # take into consideration the height of the taskbar, + # but don't blame me -- there isn't any way to detect + # it or figure out its dimensions. The same probably + # applies to any window manager with some magic windows + # glued to the top or bottom of the screen) + + if {$rooty > [expr {$screenHeight / 2}]} { + # we are in the lower half of the screen -- + # pop it up. Y is zero; that parts easy. The height + # is simply the y coordinate of our widget, minus + # a pixel for some visual separation. The y coordinate + # will be the topof the screen. + set y 1 + set height [expr {$rooty - 1 - $y}] + + } else { + # we are in the upper half of the screen -- + # pop it down + set y [expr {$rooty + $vrooty + \ + [winfo reqheight $widgets(this)] + 1}] + set height [expr {$screenHeight - $y}] + + } + + # force a scrollbar + HandleScrollbar $widgets(this) crop + } + } + + if {$y < 0} { + # hmmm. Bummer. + set y 0 + set height $screenheight + } + + set geometry [format "=%dx%d+%d+%d" $width $height $x $y] + + return $geometry +} + +# ::combobox::DoInternalWidgetCommand -- +# +# perform an internal widget command, then mung any error results +# to look like it came from our megawidget. A lot of work just to +# give the illusion that our megawidget is an atomic widget +# +# Arguments: +# +# w widget pathname +# subwidget pathname of the subwidget +# command subwidget command to be executed +# args arguments to the command +# +# Returns: +# +# The result of the subwidget command, or an error + +proc ::combobox::DoInternalWidgetCommand {w subwidget command args} { + upvar ::combobox::${w}::widgets widgets + upvar ::combobox::${w}::options options + + set subcommand $command + set command [concat $widgets($subwidget) $command $args] + if {[catch $command result]} { + # replace the subwidget name with the megawidget name + regsub $widgets($subwidget) $result $widgets(this) result + + # replace specific instances of the subwidget command + # with out megawidget command + switch $subwidget,$subcommand { + listbox,index {regsub "index" $result "list index" result} + listbox,insert {regsub "insert" $result "list insert" result} + listbox,delete {regsub "delete" $result "list delete" result} + listbox,get {regsub "get" $result "list get" result} + listbox,size {regsub "size" $result "list size" result} + } + error $result + + } else { + return $result + } +} + + +# ::combobox::WidgetProc -- +# +# This gets uses as the widgetproc for an combobox widget. +# Notice where the widget is created and you'll see that the +# actual widget proc merely evals this proc with all of the +# arguments intact. +# +# Note that some widget commands are defined "inline" (ie: +# within this proc), and some do most of their work in +# separate procs. This is merely because sometimes it was +# easier to do it one way or the other. +# +# Arguments: +# +# w widget pathname +# command widget subcommand +# args additional arguments; varies with the subcommand +# +# Results: +# +# Performs the requested widget command + +proc ::combobox::WidgetProc {w command args} { + upvar ::combobox::${w}::widgets widgets + upvar ::combobox::${w}::options options + upvar ::combobox::${w}::oldFocus oldFocus + upvar ::combobox::${w}::oldFocus oldGrab + + set command [::combobox::Canonize $w command $command] + + # this is just shorthand notation... + set doWidgetCommand \ + [list ::combobox::DoInternalWidgetCommand $widgets(this)] + + if {$command == "list"} { + # ok, the next argument is a list command; we'll + # rip it from args and append it to command to + # create a unique internal command + # + # NB: because of the sloppy way we are doing this, + # we'll also let the user enter our secret command + # directly (eg: listinsert, listdelete), but we + # won't document that fact + set command "list-[lindex $args 0]" + set args [lrange $args 1 end] + } + + set result "" + + # many of these commands are just synonyms for specific + # commands in one of the subwidgets. We'll get them out + # of the way first, then do the custom commands. + switch $command { + bbox - + delete - + get - + icursor - + index - + insert - + scan - + selection - + xview { + set result [eval $doWidgetCommand entry $command $args] + } + list-get {set result [eval $doWidgetCommand listbox get $args]} + list-index {set result [eval $doWidgetCommand listbox index $args]} + list-size {set result [eval $doWidgetCommand listbox size $args]} + + select { + if {[llength $args] == 1} { + set index [lindex $args 0] + set result [Select $widgets(this) $index] + } else { + error "usage: $w select index" + } + } + + subwidget { + set knownWidgets [list button entry listbox popup vsb] + if {[llength $args] == 0} { + return $knownWidgets + } + + set name [lindex $args 0] + if {[lsearch $knownWidgets $name] != -1} { + set result $widgets($name) + } else { + error "unknown subwidget $name" + } + } + + curselection { + set result [eval $doWidgetCommand listbox curselection] + } + + list-insert { + eval $doWidgetCommand listbox insert $args + set result [HandleScrollbar $w "grow"] + } + + list-delete { + eval $doWidgetCommand listbox delete $args + set result [HandleScrollbar $w "shrink"] + } + + toggle { + # ignore this command if the widget is disabled... + if {$options(-state) == "disabled"} return + + # pops down the list if it is not, hides it + # if it is... + if {[winfo ismapped $widgets(popup)]} { + set result [$widgets(this) close] + } else { + set result [$widgets(this) open] + } + } + + open { + + # if this is an editable combobox, the focus should + # be set to the entry widget + if {$options(-editable)} { + focus $widgets(entry) + $widgets(entry) select range 0 end + $widgets(entry) icur end + } + + # if we are disabled, we won't allow this to happen + if {$options(-state) == "disabled"} { + return 0 + } + + # compute the geometry of the window to pop up, and set + # it, and force the window manager to take notice + # (even if it is not presently visible). + # + # this isn't strictly necessary if the window is already + # mapped, but we'll go ahead and set the geometry here + # since its harmless and *may* actually reset the geometry + # to something better in some weird case. + set geometry [::combobox::ComputeGeometry $widgets(this)] + wm geometry $widgets(popup) $geometry + update idletasks + + # if we are already open, there's nothing else to do + if {[winfo ismapped $widgets(popup)]} { + return 0 + } + + # save the widget that currently has the focus; we'll restore + # the focus there when we're done + set oldFocus [focus] + + # ok, tweak the visual appearance of things and + # make the list pop up + $widgets(button) configure -relief sunken + raise $widgets(popup) [winfo parent $widgets(this)] + wm deiconify $widgets(popup) + + # force focus to the entry widget so we can handle keypress + # events for traversal + focus -force $widgets(entry) + + # select something by default, but only if its an + # exact match... + ::combobox::Find $widgets(this) 1 + + # save the current grab state for the display containing + # this widget. We'll restore it when we close the dropdown + # list + set status "none" + set grab [grab current $widgets(this)] + if {$grab != ""} {set status [grab status $grab]} + set oldGrab [list $grab $status] + unset grab status + + # *gasp* do a global grab!!! Mom always told not to + # do things like this, but these are desparate times. + grab -global $widgets(this) + + # fake the listbox into thinking it has focus. This is + # necessary to get scanning initialized properly in the + # listbox. + event generate $widgets(listbox) + + return 1 + } + + close { + # if we are already closed, don't do anything... + if {![winfo ismapped $widgets(popup)]} { + return 0 + } + + # restore the focus and grab, but ignore any errors... + # we're going to be paranoid and release the grab before + # trying to set any other grab because we really really + # really want to make sure the grab is released. + catch {focus $oldFocus} result + catch {grab release $widgets(this)} + catch { + set status [lindex $oldGrab 1] + if {$status == "global"} { + grab -global [lindex $oldGrab 0] + } elseif {$status == "local"} { + grab [lindex $oldGrab 0] + } + unset status + } + + # hides the listbox + $widgets(button) configure -relief raised + wm withdraw $widgets(popup) + + # select the data in the entry widget. Not sure + # why, other than observation seems to suggest that's + # what windows widgets do. + set editable [::combobox::GetBoolean $options(-editable)] + if {$editable} { + $widgets(entry) selection range 0 end + $widgets(button) configure -relief raised + } + + + # magic tcl stuff (see tk.tcl in the distribution + # lib directory) + tkCancelRepeat + + return 1 + } + + cget { + if {[llength $args] != 1} { + error "wrong # args: should be $w cget option" + } + set opt [::combobox::Canonize $w option [lindex $args 0]] + + if {$opt == "-value"} { + set result [$widget(entry) get] + } else { + set result $options($opt) + } + } + + configure { + set result [eval ::combobox::Configure {$w} $args] + } + + default { + error "bad option \"$command\"" + } + } + + return $result +} + +# ::combobox::Configure -- +# +# Implements the "configure" widget subcommand +# +# Arguments: +# +# w widget pathname +# args zero or more option/value pairs (or a single option) +# +# Results: +# +# Performs typcial "configure" type requests on the widget + +proc ::combobox::Configure {w args} { + variable widgetOptions + variable defaultEntryCursor + + upvar ::combobox::${w}::widgets widgets + upvar ::combobox::${w}::options options + + if {[llength $args] == 0} { + # hmmm. User must be wanting all configuration information + # note that if the value of an array element is of length + # one it is an alias, which needs to be handled slightly + # differently + set results {} + foreach opt [lsort [array names widgetOptions]] { + if {[llength $widgetOptions($opt)] == 1} { + set alias $widgetOptions($opt) + set optName $widgetOptions($alias) + lappend results [list $opt $optName] + } else { + set optName [lindex $widgetOptions($opt) 0] + set optClass [lindex $widgetOptions($opt) 1] + set default [option get $w $optName $optClass] + lappend results [list $opt $optName $optClass \ + $default $options($opt)] + } + } + + return $results + } + + # one argument means we are looking for configuration + # information on a single option + if {[llength $args] == 1} { + set opt [::combobox::Canonize $w option [lindex $args 0]] + + set optName [lindex $widgetOptions($opt) 0] + set optClass [lindex $widgetOptions($opt) 1] + set default [option get $w $optName $optClass] + set results [list $opt $optName $optClass \ + $default $options($opt)] + return $results + } + + # if we have an odd number of values, bail. + if {[expr {[llength $args]%2}] == 1} { + # hmmm. An odd number of elements in args + error "value for \"[lindex $args end]\" missing" + } + + # Great. An even number of options. Let's make sure they + # are all valid before we do anything. Note that Canonize + # will generate an error if it finds a bogus option; otherwise + # it returns the canonical option name + foreach {name value} $args { + set name [::combobox::Canonize $w option $name] + set opts($name) $value + } + + # process all of the configuration options + # some (actually, most) options require us to + # do something, like change the attributes of + # a widget or two. Here's where we do that... + foreach option [array names opts] { + set newValue $opts($option) + if {[info exists options($option)]} { + set oldValue $options($option) + } + + switch -- $option { + -background { + $widgets(frame) configure -background $newValue + $widgets(entry) configure -background $newValue + $widgets(listbox) configure -background $newValue + $widgets(vsb) configure -background $newValue + $widgets(vsb) configure -troughcolor $newValue + set options($option) $newValue + } + + -borderwidth { + $widgets(frame) configure -borderwidth $newValue + set options($option) $newValue + } + + -command { + # nothing else to do... + set options($option) $newValue + } + + -commandstate { + # do some value checking... + if {$newValue != "normal" && $newValue != "disabled"} { + set options($option) $oldValue + set message "bad state value \"$newValue\";" + append message " must be normal or disabled" + error $message + } + set options($option) $newValue + } + + -cursor { + $widgets(frame) configure -cursor $newValue + $widgets(entry) configure -cursor $newValue + $widgets(listbox) configure -cursor $newValue + set options($option) $newValue + } + + -editable { + if {$newValue} { + # it's editable... + $widgets(entry) configure \ + -state normal \ + -cursor $defaultEntryCursor + } else { + $widgets(entry) configure \ + -state disabled \ + -cursor $options(-cursor) + } + set options($option) $newValue + } + + -font { + $widgets(entry) configure -font $newValue + $widgets(listbox) configure -font $newValue + set options($option) $newValue + } + + -foreground { + $widgets(entry) configure -foreground $newValue + $widgets(button) configure -foreground $newValue + $widgets(listbox) configure -foreground $newValue + set options($option) $newValue + } + + -height { + $widgets(listbox) configure -height $newValue + HandleScrollbar $w + set options($option) $newValue + } + + -highlightbackground { + $widgets(frame) configure -highlightbackground $newValue + set options($option) $newValue + } + + -highlightcolor { + $widgets(frame) configure -highlightcolor $newValue + set options($option) $newValue + } + + -highlightthickness { + $widgets(frame) configure -highlightthickness $newValue + set options($option) $newValue + } + + -image { + if {[string length $newValue] > 0} { + $widgets(button) configure -image $newValue + } else { + $widgets(button) configure -image ::combobox::bimage + } + set options($option) $newValue + } + + -maxheight { + # ComputeGeometry may dork with the actual height + # of the listbox, so let's undork it + $widgets(listbox) configure -height $options(-height) + HandleScrollbar $w + set options($option) $newValue + } + + -relief { + $widgets(frame) configure -relief $newValue + set options($option) $newValue + } + + -selectbackground { + $widgets(entry) configure -selectbackground $newValue + $widgets(listbox) configure -selectbackground $newValue + set options($option) $newValue + } + + -selectborderwidth { + $widgets(entry) configure -selectborderwidth $newValue + $widgets(listbox) configure -selectborderwidth $newValue + set options($option) $newValue + } + + -selectforeground { + $widgets(entry) configure -selectforeground $newValue + $widgets(listbox) configure -selectforeground $newValue + set options($option) $newValue + } + + -state { + if {$newValue == "normal"} { + # it's enabled + set editable [::combobox::GetBoolean \ + $options(-editable)] + if {$editable} { + $widgets(entry) configure -state normal + $widgets(entry) configure -takefocus 1 + } + } elseif {$newValue == "disabled"} { + # it's disabled + $widgets(entry) configure -state disabled + $widgets(entry) configure -takefocus 0 + + } else { + set options($option) $oldValue + set message "bad state value \"$newValue\";" + append message " must be normal or disabled" + error $message + } + + set options($option) $newValue + } + + -takefocus { + $widgets(entry) configure -takefocus $newValue + set options($option) $newValue + } + + -textvariable { + $widgets(entry) configure -textvariable $newValue + set options($option) $newValue + } + + -value { + ::combobox::SetValue $widgets(this) $newValue + set options($option) $newValue + } + + -width { + $widgets(entry) configure -width $newValue + $widgets(listbox) configure -width $newValue + set options($option) $newValue + } + + -xscrollcommand { + $widgets(entry) configure -xscrollcommand $newValue + set options($option) $newValue + } + + } + } +} + +# ::combobox::VTrace -- +# +# this proc is called whenever the user changes the value of +# the -textvariable associated with a widget +# +# Arguments: +# +# w widget pathname +# args standard stuff from a variable trace +# +# Returns: +# +# Empty String + +proc ::combobox::VTrace {w args} { + upvar ::combobox::${w}::widgets widgets + upvar ::combobox::${w}::options options + upvar ::combobox::${w}::ignoreTrace ignoreTrace + + if {[info exists ignoreTrace]} return + ::combobox::SetValue $widgets(this) [set ::$options(-textvariable)] + + return "" +} + +# ::combobox::SetValue -- +# +# sets the value of the combobox and calls the -command, +# if defined +# +# Arguments: +# +# w widget pathname +# newValue the new value of the combobox +# +# Returns +# +# Empty string + +proc ::combobox::SetValue {w newValue} { + + upvar ::combobox::${w}::widgets widgets + upvar ::combobox::${w}::options options + upvar ::combobox::${w}::ignoreTrace ignoreTrace + upvar ::combobox::${w}::oldValue oldValue + + if {[info exists options(-textvariable)] \ + && [string length $options(-textvariable)] > 0} { + set variable ::$options(-textvariable) + set $variable $newValue + } else { + set oldstate [$widgets(entry) cget -state] + $widgets(entry) configure -state normal + $widgets(entry) delete 0 end + $widgets(entry) insert 0 $newValue + $widgets(entry) configure -state $oldstate + } + + # set our internal textvariable; this will cause any public + # textvariable (ie: defined by the user) to be updated as + # well +# set ::combobox::${w}::entryTextVariable $newValue + + # redefine our concept of the "old value". Do it before running + # any associated command so we can be sure it happens even + # if the command somehow fails. + set oldValue $newValue + + + # call the associated command. The proc will handle whether or + # not to actually call it, and with what args + CallCommand $w $newValue + + return "" +} + +# ::combobox::CallCommand -- +# +# calls the associated command, if any, appending the new +# value to the command to be called. +# +# Arguments: +# +# w widget pathname +# newValue the new value of the combobox +# +# Returns +# +# empty string + +proc ::combobox::CallCommand {w newValue} { + upvar ::combobox::${w}::widgets widgets + upvar ::combobox::${w}::options options + + # call the associated command, if defined and -commandstate is + # set to "normal" + if {$options(-commandstate) == "normal" && \ + [string length $options(-command)] > 0} { + set args [list $widgets(this) $newValue] + uplevel \#0 $options(-command) $args + } +} + + +# ::combobox::GetBoolean -- +# +# returns the value of a (presumably) boolean string (ie: it should +# do the right thing if the string is "yes", "no", "true", 1, etc +# +# Arguments: +# +# value value to be converted +# errorValue a default value to be returned in case of an error +# +# Returns: +# +# a 1 or zero, or the value of errorValue if the string isn't +# a proper boolean value + +proc ::combobox::GetBoolean {value {errorValue 1}} { + if {[catch {expr {([string trim $value])?1:0}} res]} { + return $errorValue + } else { + return $res + } +} + +# ::combobox::convert -- +# +# public routine to convert %x, %y and %W binding substitutions. +# Given an x, y and or %W value relative to a given widget, this +# routine will convert the values to be relative to the combobox +# widget. For example, it could be used in a binding like this: +# +# bind .combobox {doSomething [::combobox::convert %W -x %x]} +# +# Note that this procedure is *not* exported, but is indented for +# public use. It is not exported because the name could easily +# clash with existing commands. +# +# Arguments: +# +# w a widget path; typically the actual result of a %W +# substitution in a binding. It should be either a +# combobox widget or one of its subwidgets +# +# args should one or more of the following arguments or +# pairs of arguments: +# +# -x will convert the value ; typically will +# be the result of a %x substitution +# -y will convert the value ; typically will +# be the result of a %y substitution +# -W (or -w) will return the name of the combobox widget +# which is the parent of $w +# +# Returns: +# +# a list of the requested values. For example, a single -w will +# result in a list of one items, the name of the combobox widget. +# Supplying "-x 10 -y 20 -W" (in any order) will return a list of +# three values: the converted x and y values, and the name of +# the combobox widget. + +proc ::combobox::convert {w args} { + set result {} + if {![winfo exists $w]} { + error "window \"$w\" doesn't exist" + } + + while {[llength $args] > 0} { + set option [lindex $args 0] + set args [lrange $args 1 end] + + switch -exact -- $option { + -x { + set value [lindex $args 0] + set args [lrange $args 1 end] + set win $w + while {[winfo class $win] != "Combobox"} { + incr value [winfo x $win] + set win [winfo parent $win] + if {$win == "."} break + } + lappend result $value + } + + -y { + set value [lindex $args 0] + set args [lrange $args 1 end] + set win $w + while {[winfo class $win] != "Combobox"} { + incr value [winfo y $win] + set win [winfo parent $win] + if {$win == "."} break + } + lappend result $value + } + + -w - + -W { + set win $w + while {[winfo class $win] != "Combobox"} { + set win [winfo parent $win] + if {$win == "."} break; + } + lappend result $win + } + } + } + return $result +} + +# ::combobox::Canonize -- +# +# takes a (possibly abbreviated) option or command name and either +# returns the canonical name or an error +# +# Arguments: +# +# w widget pathname +# object type of object to canonize; must be one of "command", +# "option", "scan command" or "list command" +# opt the option (or command) to be canonized +# +# Returns: +# +# Returns either the canonical form of an option or command, +# or raises an error if the option or command is unknown or +# ambiguous. + +proc ::combobox::Canonize {w object opt} { + variable widgetOptions + variable columnOptions + variable widgetCommands + variable listCommands + variable scanCommands + + switch $object { + command { + if {[lsearch -exact $widgetCommands $opt] >= 0} { + return $opt + } + + # command names aren't stored in an array, and there + # isn't a way to get all the matches in a list, so + # we'll stuff the commands in a temporary array so + # we can use [array names] + set list $widgetCommands + foreach element $list { + set tmp($element) "" + } + set matches [array names tmp ${opt}*] + } + + {list command} { + if {[lsearch -exact $listCommands $opt] >= 0} { + return $opt + } + + # command names aren't stored in an array, and there + # isn't a way to get all the matches in a list, so + # we'll stuff the commands in a temporary array so + # we can use [array names] + set list $listCommands + foreach element $list { + set tmp($element) "" + } + set matches [array names tmp ${opt}*] + } + + {scan command} { + if {[lsearch -exact $scanCommands $opt] >= 0} { + return $opt + } + + # command names aren't stored in an array, and there + # isn't a way to get all the matches in a list, so + # we'll stuff the commands in a temporary array so + # we can use [array names] + set list $scanCommands + foreach element $list { + set tmp($element) "" + } + set matches [array names tmp ${opt}*] + } + + option { + if {[info exists widgetOptions($opt)] \ + && [llength $widgetOptions($opt)] == 2} { + return $opt + } + set list [array names widgetOptions] + set matches [array names widgetOptions ${opt}*] + } + + } + + if {[llength $matches] == 0} { + set choices [HumanizeList $list] + error "unknown $object \"$opt\"; must be one of $choices" + + } elseif {[llength $matches] == 1} { + set opt [lindex $matches 0] + + # deal with option aliases + switch $object { + option { + set opt [lindex $matches 0] + if {[llength $widgetOptions($opt)] == 1} { + set opt $widgetOptions($opt) + } + } + } + + return $opt + + } else { + set choices [HumanizeList $list] + error "ambiguous $object \"$opt\"; must be one of $choices" + } +} + +# ::combobox::HumanizeList -- +# +# Returns a human-readable form of a list by separating items +# by columns, but separating the last two elements with "or" +# (eg: foo, bar or baz) +# +# Arguments: +# +# list a valid tcl list +# +# Results: +# +# A string which as all of the elements joined with ", " or +# the word " or " + +proc ::combobox::HumanizeList {list} { + + if {[llength $list] == 1} { + return [lindex $list 0] + } else { + set list [lsort $list] + set secondToLast [expr {[llength $list] -2}] + set most [lrange $list 0 $secondToLast] + set last [lindex $list end] + + return "[join $most {, }] or $last" + } +} + +# end of combobox.tcl diff --git a/lib/maracasVisuLib/src/interface/tcl/tkwidgets/ibrowser.tcl b/lib/maracasVisuLib/src/interface/tcl/tkwidgets/ibrowser.tcl new file mode 100644 index 0000000..a373a56 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/tcl/tkwidgets/ibrowser.tcl @@ -0,0 +1,1453 @@ +#************************************************************************* +#* * * +#* NAME : ibrowser.tcl * PROJECT : MARACAS * +#* AUTHOR : Leonardo Flórez/Kyron * TYPE : TCL/TK widget def. * +#* VERSION : v2.0 * CREATION : 06/05/2001 * +#* LANGUAGE : TCL * REVISION : 16/07/2001 * +#* * * +#************************************************************************* +#* * +#* Description : This file defines a new TCL/TK widget that allows the * +#* user to browse a serie of image thumbnails. It has a * +#* dinamical scroll bar, so, don't worry about use one. * +#* * +#* The basic use of this widget is: * +#* * +#* 1. Create a new widget: "ibrowser " * +#* Options given are a list of '-