From 2e142df11d6f312a2a2b5097b8da73571ed523e8 Mon Sep 17 00:00:00 2001 From: Leonardo Florez-Valencia Date: Mon, 2 Jul 2018 16:12:29 +0200 Subject: [PATCH] Moved to version 1.0 --- CMakeLists.txt | 87 +- README.md | 4 + appli/CMakeLists.txt | 11 +- appli/PipelineEditor/CMakeLists.txt | 31 +- appli/PipelineEditor/PipelineEditor.cxx | 172 +- appli/PipelineEditor/PipelineEditor.h | 34 +- appli/PipelineEditor/PipelineEditor.ui | 132 +- appli/PipelineEditor/PluginsNavigator.cxx | 88 + appli/PipelineEditor/PluginsNavigator.h | 37 + appli/bash/CMakeLists.txt | 34 + appli/bash/ExecutePipeline.cxx | 143 + appli/bash/HostCreator.cxx | 249 + appli/bash/InteractivePipelineCreator.cxx.d | 319 + appli/bash/MOC.cxx | 438 + appli/examples/CMakeLists.txt | 29 + appli/examples/ComplexAppend.cxx | 88 + appli/examples/Parameters.cxx | 56 + appli/examples/ReadRawFile_00.cxx | 36 + appli/examples/ReadRawFile_01.cxx | 40 + appli/examples/ReadRawFile_02.cxx | 36 + appli/examples/ReadWriteRawFile_00.cxx | 38 + appli/examples/ReadWriteRawFile_01.cxx | 45 + appli/examples/ReadWriteRawFile_02.cxx | 37 + bash/CMakeLists.txt | 25 - bash/Config.h.in | 274 - bash/CreateDemanglers.cxx | 121 - bash/CreateInstances.cxx | 168 - bash/CreateRealConfig.cxx | 37 - bash/HostCreator.cxx | 193 - cmake/BaseConfig.cmake | 51 - cmake/CMakeLists.txt | 22 +- cmake/Functions.cmake | 328 - cmake/KitwareTools.cmake | 19 - cmake/Options.cmake | 25 - cmake/QtTools.cmake | 26 - cmake/cpPlg3rdParty.cmake | 31 + cmake/cpPlgDefinitions.cmake | 37 + cmake/cpPlgFunctions.cmake | 414 + cmake/cpPlgInstallCommands.cmake | 47 + cmake/cpPlgUninstall.cmake.in | 27 + cmake/cpPluginsConfig.cmake.in | 143 +- data/data.wxml | 88 - data/read_write_image.wxml | 12 - dependencies/cpPlugins_Install_CMAKE.sh | 198 - .../cpPlugins_Install_Dependencies.py | 383 - dependencies/cpPlugins_Install_ITK.sh | 216 - dependencies/cpPlugins_Install_QT4.sh | 219 - dependencies/cpPlugins_Install_VTK.sh | 256 - .../cpPlugins_ThirdParty_Install_linux.sh | 317 - dependencies/dependencies.py | 328 - dependencies/qt-4.8.6_MAC.patch | 18 - docs/CMakeLists.txt | 33 + docs/Doxyfile.in | 2498 ++ docs/uml/cpPlugins.dia | Bin 0 -> 3421 bytes install/macos/clean_libs.sh | 13 - install/macos/prepare_libs.sh | 46 - install/macos/relink_lib.sh | 36 - lib/CMakeLists.txt | 95 +- lib/QCustomPlot/GPL.txt | 674 - lib/QCustomPlot/QCustomPlot.cxx | 23553 ---------------- lib/QCustomPlot/QCustomPlot.h | 3772 --- lib/QCustomPlot/changelog.txt | 432 - lib/TinyCon/CompletionConsole.cxx | 183 + lib/TinyCon/CompletionConsole.h | 47 + lib/TinyCon/Console.cxx | 417 + lib/TinyCon/Console.h | 71 + lib/TinyCon/README | 84 + lib/TinyCon/Trie.cxx | 154 + lib/TinyCon/Trie.h | 52 + lib/cpBaseQtApplication/Blocker.cxx | 67 - lib/cpBaseQtApplication/Blocker.h | 30 - lib/cpBaseQtApplication/MainHelper.h | 90 - lib/cpBaseQtApplication/MainWindow.cxx | 309 - lib/cpBaseQtApplication/MainWindow.h | 136 - lib/cpBaseQtApplication/Pipeline/Block.cxx | 418 - lib/cpBaseQtApplication/Pipeline/Block.h | 120 - lib/cpBaseQtApplication/Pipeline/Canvas.cxx | 452 - lib/cpBaseQtApplication/Pipeline/Canvas.h | 83 - .../Pipeline/Connection.cxx | 135 - lib/cpBaseQtApplication/Pipeline/Connection.h | 60 - .../Pipeline/EventFilter.cxx | 227 - .../Pipeline/EventFilter.h | 96 - lib/cpBaseQtApplication/Pipeline/Port.cxx | 358 - lib/cpBaseQtApplication/Pipeline/Port.h | 216 - lib/cpBaseQtApplication/Plugins/Navigator.cxx | 92 - lib/cpBaseQtApplication/Plugins/Navigator.h | 39 - .../Algorithms/BezierCurveFunction.h | 77 - .../Algorithms/BezierCurveFunction.hxx | 155 - lib/cpExtensions/Algorithms/CPRImageFilter.h | 76 - .../Algorithms/CPRImageFilter.hxx | 127 - .../Algorithms/DiscontinuityMapImageFilter.h | 66 - .../DiscontinuityMapImageFilter.hxx | 91 - lib/cpExtensions/Algorithms/FluxMedialness.h | 74 - .../Algorithms/FluxMedialness.hxx | 108 - .../Algorithms/GaussianDensityImageFilter.h | 103 - .../Algorithms/GradientImageFunctionBase.h | 79 - .../Algorithms/GradientImageFunctionBase.hxx | 72 - .../Algorithms/GulsunTekMedialness.h | 76 - .../Algorithms/GulsunTekMedialness.hxx | 114 - lib/cpExtensions/Algorithms/ImageBlender.cxx | 234 - lib/cpExtensions/Algorithms/ImageBlender.h | 65 - .../Algorithms/ImageFunctionFilter.h | 69 - .../Algorithms/ImageFunctionFilter.hxx | 67 - .../Algorithms/ImageFunctorFilter.h | 68 - .../Algorithms/ImageFunctorFilter.hxx | 65 - .../ImageToBoundingBoxFromThreshold.h | 78 - .../ImageToBoundingBoxFromThreshold.hxx | 89 - .../Algorithms/InertiaMedialness.h | 215 - .../Algorithms/InertiaTensorFunction.h | 180 - lib/cpExtensions/Algorithms/IsoImageSlicer.h | 185 - .../Algorithms/IsoImageSlicer.hxx | 234 - .../IterativeGaussianModelEstimator.h | 171 - .../IterativeGaussianModelEstimator.hxx | 365 - .../Algorithms/KalmanConstantFilter.cxx | 49 - .../Algorithms/KalmanConstantFilter.h | 56 - lib/cpExtensions/Algorithms/KalmanFilter.cxx | 137 - lib/cpExtensions/Algorithms/KalmanFilter.h | 213 - lib/cpExtensions/Algorithms/KalmanFilter.hxx | 37 - .../Algorithms/KalmanVelocityFilter.cxx | 90 - .../Algorithms/KalmanVelocityFilter.h | 66 - .../Algorithms/LightCompensationFilter.h | 65 - .../Algorithms/LightCompensationFilter.hxx | 96 - lib/cpExtensions/Algorithms/MFluxMedialness.h | 74 - .../Algorithms/MFluxMedialness.hxx | 159 - .../Algorithms/MacheteImageFilter.h | 72 - .../Algorithms/MacheteImageFilter.hxx | 92 - .../MultiScaleGaussianImageFilter.h | 86 - .../MultiScaleGaussianImageFilter.hxx | 226 - .../Algorithms/ParallelImageMean.h | 70 - .../Algorithms/ParallelImageMean.hxx | 65 - .../PolyLineParametricPathToSimple3DCurve.cxx | 94 - .../PolyLineParametricPathToSimple3DCurve.h | 65 - .../Algorithms/PolyLineParametricPathWriter.h | 74 - .../PolyLineParametricPathWriter.hxx | 160 - .../Algorithms/RGBExtractFunction.h | 54 - .../RGBImageToOtherChannelsFilter.h | 67 - .../RGBImageToOtherChannelsFilter.hxx | 71 - .../Algorithms/RGBToHSVFunction.h | 87 - .../Algorithms/RGBToSingleChannelFunctor.h | 86 - .../Algorithms/RGBToSingleChannelFunctor.hxx | 188 - .../Algorithms/RGBToYPbPrFunction.h | 72 - .../Algorithms/RasterContourFilter.h | 105 - .../Algorithms/RasterContourFilter.hxx | 172 - .../RegionOfInterestImageCalculator.h | 73 - .../RegionOfInterestImageCalculator.hxx | 92 - lib/cpExtensions/Algorithms/SkeletonReader.h | 85 - .../Algorithms/SkeletonReader.hxx | 176 - .../Algorithms/SkeletonToImageFilter.h | 81 - .../Algorithms/SkeletonToImageFilter.hxx | 119 - lib/cpExtensions/Algorithms/SkeletonWriter.h | 69 - .../Algorithms/SkeletonWriter.hxx | 159 - .../Algorithms/SpatialObjectMaskImageFilter.h | 87 - .../SpatialObjectMaskImageFilter.hxx | 136 - .../Algorithms/UnaryThresholdImageFilter.h | 102 - .../Algorithms/UnaryThresholdImageFilter.hxx | 245 - lib/cpExtensions/Config.h.in | 70 - lib/cpExtensions/DataStructures/Graph.h | 166 - lib/cpExtensions/DataStructures/Graph.hxx | 267 - .../DataStructures/PolyLineParametricPath.h | 100 - .../DataStructures/PolyLineParametricPath.hxx | 215 - .../DataStructures/Simple3DCurve.cxx | 137 - .../DataStructures/Simple3DCurve.h | 75 - lib/cpExtensions/DataStructures/Skeleton.h | 62 - lib/cpExtensions/DataStructures/Skeleton.hxx | 94 - lib/cpExtensions/Interaction/BaseStyle.cxx | 437 - lib/cpExtensions/Interaction/BaseStyle.h | 193 - .../Interaction/ImageSlicePointPlacer.cxx | 275 - .../Interaction/ImageSlicePointPlacer.h | 78 - .../Interaction/ImageSliceStyle.cxx | 414 - .../Interaction/ImageSliceStyle.h | 88 - lib/cpExtensions/Interaction/SeedWidget.cxx | 165 - lib/cpExtensions/Interaction/SeedWidget.h | 63 - lib/cpExtensions/QT/ActorsWidgetInterface.h | 68 - lib/cpExtensions/QT/ConfigurationChooser.cxx | 51 - lib/cpExtensions/QT/ConfigurationChooser.h | 45 - lib/cpExtensions/QT/ConfigurationChooser.ui | 51 - lib/cpExtensions/QT/ImageWidget.cxx | 225 - lib/cpExtensions/QT/ImageWidget.h | 75 - lib/cpExtensions/QT/MPR3DWidget.cxx | 140 - lib/cpExtensions/QT/MPR3DWidget.h | 64 - lib/cpExtensions/QT/MPRInteractionCommand.cxx | 97 - lib/cpExtensions/QT/MPRInteractionCommand.h | 58 - lib/cpExtensions/QT/RendererWidget.cxx | 990 - lib/cpExtensions/QT/RendererWidget.h | 138 - lib/cpExtensions/QT/SimpleMPRWidget.cxx | 635 - lib/cpExtensions/QT/SimpleMPRWidget.h | 135 - lib/cpExtensions/QT/SimpleMPRWidget.ui | 48 - .../QT/WindowLevelImageConfiguration.cxx | 231 - .../QT/WindowLevelImageConfiguration.h | 56 - .../QT/WindowLevelImageConfiguration.ui | 216 - .../Visualization/CursorActors.cxx | 176 - lib/cpExtensions/Visualization/CursorActors.h | 70 - lib/cpExtensions/Visualization/ImageActor.cxx | 94 - lib/cpExtensions/Visualization/ImageActor.h | 62 - .../ImageIndexesContainerToPolyData.h | 71 - .../ImageIndexesContainerToPolyData.hxx | 188 - .../Visualization/ImageOutlineActor.cxx | 68 - .../Visualization/ImageOutlineActor.h | 59 - .../Visualization/ImageOutlineSource.cxx | 156 - .../Visualization/ImageOutlineSource.h | 53 - .../Visualization/ImageSliceActors.cxx | 174 - .../Visualization/ImageSliceActors.h | 74 - .../Visualization/ImageSliceMapper.cxx | 64 - .../Visualization/ImageSliceMapper.h | 43 - .../Visualization/ImageViewerActors.cxx | 169 - .../Visualization/ImageViewerActors.h | 64 - .../Visualization/LUTImageActor.cxx | 160 - .../Visualization/LUTImageActor.h | 78 - lib/cpExtensions/Visualization/LineSource.cxx | 119 - lib/cpExtensions/Visualization/LineSource.h | 66 - .../Visualization/MPR3DActors.cxx | 186 - lib/cpExtensions/Visualization/MPR3DActors.h | 85 - lib/cpExtensions/Visualization/MeshActor.cxx | 56 - lib/cpExtensions/Visualization/MeshActor.h | 45 - .../Visualization/OutlineSource.cxx | 50 - .../Visualization/OutlineSource.h | 48 - .../PolyLineParametricPathToPolyData.cxx | 131 - .../PolyLineParametricPathToPolyData.h | 60 - .../Visualization/Simple3DCurveToPolyData.cxx | 119 - .../Visualization/Simple3DCurveToPolyData.h | 60 - .../Visualization/SkeletonToPolyData.cxx | 147 - .../Visualization/SkeletonToPolyData.h | 60 - .../Visualization/WindowLevelImageActor.cxx | 200 - .../Visualization/WindowLevelImageActor.h | 66 - lib/cpInstances/BaseObjects/ITKBaseObjects.i | 41 - .../BaseObjects/ITKBoundingBoxes.i | 6 - lib/cpInstances/BaseObjects/ITKTransforms.i | 18 - lib/cpInstances/CMakeLists.txt | 50 - lib/cpInstances/DataObjects/BoundingBox.cxx | 93 - lib/cpInstances/DataObjects/BoundingBox.h | 107 - lib/cpInstances/DataObjects/Image.cxx | 196 - lib/cpInstances/DataObjects/Image.d | 27 - lib/cpInstances/DataObjects/Image.h | 71 - lib/cpInstances/DataObjects/Mesh.cxx | 180 - lib/cpInstances/DataObjects/Mesh.d | 4 - lib/cpInstances/DataObjects/Mesh.h | 53 - .../DataObjects/PolyLineParametricPath.cxx | 39 - .../DataObjects/PolyLineParametricPath.d | 4 - .../DataObjects/PolyLineParametricPath.h | 52 - lib/cpInstances/DataObjects/Simple3DCurve.cxx | 64 - lib/cpInstances/DataObjects/Simple3DCurve.d | 1 - lib/cpInstances/DataObjects/Simple3DCurve.h | 62 - lib/cpInstances/DataObjects/Skeleton.cxx | 39 - lib/cpInstances/DataObjects/Skeleton.d | 1 - lib/cpInstances/DataObjects/Skeleton.h | 50 - lib/cpInstances/Extensions/Paths.i | 11 - lib/cpInstances/Extensions/Skeleton.i | 8 - lib/cpInstances/Geometries/ITKMeshes.i | 16 - lib/cpInstances/Geometries/ITKPaths.i | 11 - lib/cpInstances/Images/ITK2VTKImageFilters.i | 20 - lib/cpInstances/Images/ITKBoxImageFilters.i | 10 - lib/cpInstances/Images/ITKImageFunctions.i | 13 - .../Images/ITKImageInterpolators.i | 23 - lib/cpInstances/Images/ITKImages.i | 41 - lib/cpInstances/Images/ITKImagesBaseFilters.i | 58 - .../Images/ITKImagesNeighborhoodIterators.i | 38 - .../Images/ITKImagesSimpleIterators.i | 27 - .../Images/itkImageToVTKImageFilter.h | 111 - .../Images/itkImageToVTKImageFilter.hxx | 141 - .../Images/itkVTKImageToImageFilter.h | 100 - .../Images/itkVTKImageToImageFilter.hxx | 107 - lib/cpPlugins/Config.h.in | 169 +- lib/cpPlugins/DataObject.cxx | 56 + lib/cpPlugins/DataObject.h | 58 + lib/cpPlugins/Filter.cxx | 163 + lib/cpPlugins/Filter.h | 122 + lib/cpPlugins/Functor.cxx | 29 + lib/cpPlugins/Functor.h | 29 + lib/cpPlugins/Interface/Loader.cxx | 278 - lib/cpPlugins/Interface/Loader.h | 71 - lib/cpPlugins/Interface/Workspace.cxx | 638 - lib/cpPlugins/Interface/Workspace.h | 156 - lib/cpPlugins/Interface/WorkspaceIO.cxx | 315 - lib/cpPlugins/Library.cxx | 126 + lib/cpPlugins/Library.h | 47 + lib/cpPlugins/Manager.cxx | 177 + lib/cpPlugins/Manager.h | 50 + lib/cpPlugins/OS/Chrono.h | 15 - lib/cpPlugins/OS/DLLManager.cxx | 50 - lib/cpPlugins/OS/DLLManager.h | 27 - lib/cpPlugins/OS/FileSystem.cxx | 202 - lib/cpPlugins/OS/FileSystem.h | 60 - lib/cpPlugins/OS/String.cxx | 37 - lib/cpPlugins/OS/String.h | 28 - lib/cpPlugins/OS/tinydir.h | 806 - lib/cpPlugins/OS/tinydir_COPYING.txt | 26 - lib/cpPlugins/OS/tinydir_README.md.txt | 78 - lib/cpPlugins/Object.cxx | 97 + lib/cpPlugins/Object.h | 206 + lib/cpPlugins/Parameters.cxx.d | 478 + lib/cpPlugins/Parameters.h.d | 182 + lib/cpPlugins/Pipeline.cxx.d | 638 + lib/cpPlugins/Pipeline.h | 150 + lib/cpPlugins/Pipeline/DataObject.cxx | 92 - lib/cpPlugins/Pipeline/DataObject.h | 62 - lib/cpPlugins/Pipeline/Events.h | 51 - lib/cpPlugins/Pipeline/Functor.cxx | 16 - lib/cpPlugins/Pipeline/Functor.h | 64 - lib/cpPlugins/Pipeline/Object.cxx | 98 - lib/cpPlugins/Pipeline/Object.h | 105 - lib/cpPlugins/Pipeline/Parameters.cxx | 742 - lib/cpPlugins/Pipeline/Parameters.h | 223 - lib/cpPlugins/Pipeline/Port.cxx | 231 - lib/cpPlugins/Pipeline/Port.h | 127 - lib/cpPlugins/Pipeline/ProcessObject.cxx | 377 - lib/cpPlugins/Pipeline/ProcessObject.h | 168 - lib/cpPlugins/Pipeline/ProcessObject.hxx | 293 - lib/cpPlugins/Pipeline/Widget.cxx | 46 - lib/cpPlugins/Pipeline/Widget.h | 65 - lib/cpPlugins/Ports.cxx | 223 + lib/cpPlugins/Ports.h | 128 + lib/cpPlugins/ProcessObject.cxx | 394 + lib/cpPlugins/ProcessObject.h | 141 + lib/cpPlugins/QT/OpenFileDialog.cxx | 107 - lib/cpPlugins/QT/OpenFileDialog.h | 41 - lib/cpPlugins/QT/ParametersDialog.cxx | 888 - lib/cpPlugins/QT/ParametersDialog.h | 69 - lib/cpPlugins/QT/SaveFileDialog.cxx | 76 - lib/cpPlugins/QT/SaveFileDialog.h | 41 - lib/cpPlugins/Value.cxx.d | 526 + lib/cpPlugins/Value.e | 16 + lib/cpPlugins/Value.h.d | 116 + lib/cpPlugins/Version.cxx.in | 12 + lib/cpPlugins/tinyxml2/OLD_CMakeLists.txt.old | 32 - lib/cpPlugins/tinyxml2/readme.md | 324 - lib/cpPlugins/tinyxml2/tinyxml2.cpp | 2467 -- lib/cpPlugins/tinyxml2/tinyxml2.h | 2106 -- lib/cpPluginsBase/AppendRawDataFilter.cxx | 57 + lib/cpPluginsBase/AppendRawDataFilter.h | 31 + lib/cpPluginsBase/BinaryAddFunctor.cxx | 41 + lib/cpPluginsBase/BinaryAddFunctor.h | 30 + lib/cpPluginsBase/DataDemultiplexerFilter.cxx | 45 + lib/cpPluginsBase/DataDemultiplexerFilter.h | 31 + lib/cpPluginsBase/Host.plg | 14 + lib/cpPluginsBase/RandomNumberSource.cxx | 49 + lib/cpPluginsBase/RandomNumberSource.h | 30 + lib/cpPluginsBase/RawData.cxx | 39 + lib/cpPluginsBase/RawData.h | 77 + lib/cpPluginsBase/RawDataFunctor.cxx | 20 + lib/cpPluginsBase/RawDataFunctor.h | 29 + lib/cpPluginsBase/RawDataFunctorFilter.cxx | 49 + lib/cpPluginsBase/RawDataFunctorFilter.h | 31 + lib/cpPluginsBase/RawFileReader.cxx | 53 + lib/cpPluginsBase/RawFileReader.h | 30 + lib/cpPluginsBase/RawFileWriter.cxx | 53 + lib/cpPluginsBase/RawFileWriter.h | 31 + lib/cpPluginsBase/RotNRawDataFunctor.cxx | 78 + lib/cpPluginsBase/RotNRawDataFunctor.h | 33 + lib/mstch/mstch.cpp | 20 + lib/mstch/mstch.hpp | 113 + lib/mstch/render_context.cpp | 72 + lib/mstch/render_context.hpp | 51 + lib/mstch/state/in_section.cpp | 34 + lib/mstch/state/in_section.hpp | 24 + lib/mstch/state/outside_section.cpp | 32 + lib/mstch/state/outside_section.hpp | 12 + lib/mstch/state/render_state.hpp | 17 + lib/mstch/template_type.cpp | 104 + lib/mstch/template_type.hpp | 30 + lib/mstch/token.cpp | 42 + lib/mstch/token.hpp | 39 + lib/mstch/utils.cpp | 44 + lib/mstch/utils.hpp | 23 + lib/mstch/visitor/get_token.hpp | 35 + lib/mstch/visitor/has_token.hpp | 31 + lib/mstch/visitor/is_node_empty.hpp | 41 + lib/mstch/visitor/render_node.hpp | 56 + lib/mstch/visitor/render_section.hpp | 57 + plugins/CMakeLists.txt | 59 - plugins/GenericPlugins/DataReproducer.cxx | 49 - plugins/GenericPlugins/DataReproducer.h | 33 - plugins/GenericPlugins/JoinBoundingBoxes.cxx | 44 - plugins/GenericPlugins/JoinBoundingBoxes.h | 25 - plugins/IO/ImageJSkeletonWriter.cxx | 104 - plugins/IO/ImageJSkeletonWriter.h | 28 - ...rvatureAnisotropicDiffusionImageFilter.cxx | 71 - ...CurvatureAnisotropicDiffusionImageFilter.h | 32 - .../ITKAnisotropicSmoothing.i | 12 - .../BinaryArithmeticImageFilter.cxx | 92 - .../BinaryArithmeticImageFilter.h | 32 - .../BinaryBooleanImageFilter.cxx | 74 - .../BinaryBooleanImageFilter.h | 32 - .../ITKBinaryFunctorFilters.i | 17 - .../BinaryContourImageFilter.cxx | 71 - .../BinaryContourImageFilter.h | 32 - .../ITKDistanceMapFilters.i | 15 - .../SignedMaurerDistanceMapImageFilter.cxx | 82 - .../SignedMaurerDistanceMapImageFilter.h | 32 - .../ITKFiniteDifference/ITKFiniteDifference.i | 15 - plugins/ITKIO/DicomSeriesReader.cxx | 102 - plugins/ITKIO/DicomSeriesReader.h | 23 - plugins/ITKIO/DicomSeriesReaderQDialog.h | 41 - plugins/ITKIO/DicomSeriesReaderQDialog.ui | 81 - plugins/ITKIO/DicomSeriesSelectorWidget.cxx | 182 - plugins/ITKIO/DicomSeriesSelectorWidget.h | 76 - plugins/ITKIO/DicomSeriesSelectorWidget.ui | 89 - plugins/ITKIO/ITKIO.i | 28 - plugins/ITKIO/ImageReader.cxx | 269 - plugins/ITKIO/ImageReader.h | 33 - plugins/ITKIO/ImageWriter.cxx | 93 - plugins/ITKIO/ImageWriter.h | 31 - .../CastImageFilter.cxx | 64 - .../CastImageFilter.h | 32 - .../ITKImageGenericFilters_1.i | 21 - .../ImageToBoundingBoxFromThreshold.cxx | 63 - .../ImageToBoundingBoxFromThreshold.h | 29 - .../MinimumMaximumImageCalculator.cxx | 120 - .../MinimumMaximumImageCalculator.h | 29 - .../RegionOfInterestImageFilter.cxx | 79 - .../RegionOfInterestImageFilter.h | 29 - .../BSplineInterpolateImageFunction.cxx | 62 - .../BSplineInterpolateImageFunction.h | 38 - .../ITKImageInterpolators.i | 25 - .../InterpolateImageFunction.cxx | 39 - .../InterpolateImageFunction.h | 54 - .../LinearInterpolateImageFunction.cxx | 58 - .../LinearInterpolateImageFunction.h | 38 - .../ITKLevelSetFilters/ITKLevelSetFilters.i | 28 - ...placianSegmentationLevelSetImageFilter.cxx | 72 - ...LaplacianSegmentationLevelSetImageFilter.h | 32 - ...resholdSegmentationLevelSetImageFilter.cxx | 76 - ...ThresholdSegmentationLevelSetImageFilter.h | 32 - plugins/ITKMorphology/ITKMorphology.i | 7 - .../ITKNeighborhoodOperatorFilters.i | 19 - .../BinaryDilateParaImageFilter.cxx | 52 - .../BinaryDilateParaImageFilter.h | 29 - .../BinaryErodeParaImageFilter.cxx | 52 - .../BinaryErodeParaImageFilter.h | 29 - plugins/ITKParaMorphology/ITKParaMorphology.i | 18 - plugins/ITKRasterFilters/ITKRasterFilters.i | 9 - .../ITKRasterFilters/RasterImageFilter.cxx | 160 - plugins/ITKRasterFilters/RasterImageFilter.h | 44 - .../ITKSeparableFilters/ITKSeparableFilters.i | 7 - .../SmoothingRecursiveGaussianImageFilter.cxx | 74 - .../SmoothingRecursiveGaussianImageFilter.h | 32 - plugins/ITKSliceFilters/CPRImageFilter.cxx | 63 - plugins/ITKSliceFilters/CPRImageFilter.h | 32 - plugins/ITKSliceFilters/ITKSliceFilters.i | 20 - .../IsoResampleImageFilter.cxx | 109 - .../ITKSliceFilters/IsoResampleImageFilter.h | 32 - .../ITKUnaryFunctorFilters/AbsImageFilter.cxx | 46 - .../ITKUnaryFunctorFilters/AbsImageFilter.h | 29 - .../BinaryThresholdImageFilter.cxx | 65 - .../BinaryThresholdImageFilter.h | 29 - .../ITKUnaryFunctorFilters.i | 33 - .../InvertIntensityImageFilter.cxx | 48 - .../InvertIntensityImageFilter.h | 29 - .../UnaryBooleanImageFilter.cxx | 49 - .../UnaryBooleanImageFilter.h | 29 - .../UnaryThresholdImageFilter.cxx | 57 - .../UnaryThresholdImageFilter.h | 29 - plugins/VTKFilters/CylinderSource.cxx | 35 - plugins/VTKFilters/CylinderSource.h | 25 - plugins/VTKFilters/MarchingCubes.cxx | 64 - plugins/VTKFilters/MarchingCubes.h | 25 - plugins/VTKFilters/SphereSource.cxx | 35 - plugins/VTKFilters/SphereSource.h | 26 - plugins/VTKIO/MeshReader.cxx | 60 - plugins/VTKIO/MeshReader.h | 24 - plugins/VTKIO/MeshWriter.cxx | 65 - plugins/VTKIO/MeshWriter.h | 24 - plugins/VTKWidgets/LineWidget.cxx | 173 - plugins/VTKWidgets/LineWidget.h | 40 - plugins/VTKWidgets/SeedWidget.cxx | 380 - plugins/VTKWidgets/SeedWidget.h | 82 - plugins/VTKWidgets/SplineWidget.cxx | 253 - plugins/VTKWidgets/SplineWidget.h | 83 - plugins/change.csv | 1 - .../DiscontinuityMapImageFilter.cxx | 49 - .../DiscontinuityMapImageFilter.h | 30 - plugins/cpExtensions/ImageFunctorFilter.cxx | 64 - plugins/cpExtensions/ImageFunctorFilter.h | 33 - .../PolyLineParametricPathToPolyData.cxx | 47 - .../PolyLineParametricPathToPolyData.h | 30 - .../PolyLineParametricPathToSimple3DCurve.cxx | 46 - .../PolyLineParametricPathToSimple3DCurve.h | 26 - .../PolyLineParametricPathWriter.cxx | 93 - .../PolyLineParametricPathWriter.h | 36 - plugins/cpExtensions/SkeletonReader.cxx | 93 - plugins/cpExtensions/SkeletonReader.h | 33 - .../cpExtensions/SkeletonToImageFilter.cxx | 54 - plugins/cpExtensions/SkeletonToImageFilter.h | 30 - plugins/cpExtensions/SkeletonWriter.cxx | 79 - plugins/cpExtensions/SkeletonWriter.h | 33 - plugins/cpExtensions/cpExtensions.i | 20 - tools/CMakeLists.txt | 29 - tools/ExecutePipeline.cxx | 45 - tools/PrintDirInfo.cxx | 56 - tools/PrintFileInfo.cxx | 56 - tools/PrintGuessInfo.cxx | 28 - tools/RenameImageFile.cxx | 62 - 491 files changed, 11974 insertions(+), 72908 deletions(-) create mode 100644 README.md create mode 100644 appli/PipelineEditor/PluginsNavigator.cxx create mode 100644 appli/PipelineEditor/PluginsNavigator.h create mode 100644 appli/bash/CMakeLists.txt create mode 100644 appli/bash/ExecutePipeline.cxx create mode 100644 appli/bash/HostCreator.cxx create mode 100644 appli/bash/InteractivePipelineCreator.cxx.d create mode 100644 appli/bash/MOC.cxx create mode 100644 appli/examples/CMakeLists.txt create mode 100644 appli/examples/ComplexAppend.cxx create mode 100644 appli/examples/Parameters.cxx create mode 100644 appli/examples/ReadRawFile_00.cxx create mode 100644 appli/examples/ReadRawFile_01.cxx create mode 100644 appli/examples/ReadRawFile_02.cxx create mode 100644 appli/examples/ReadWriteRawFile_00.cxx create mode 100644 appli/examples/ReadWriteRawFile_01.cxx create mode 100644 appli/examples/ReadWriteRawFile_02.cxx delete mode 100644 bash/CMakeLists.txt delete mode 100644 bash/Config.h.in delete mode 100644 bash/CreateDemanglers.cxx delete mode 100644 bash/CreateInstances.cxx delete mode 100644 bash/CreateRealConfig.cxx delete mode 100644 bash/HostCreator.cxx delete mode 100644 cmake/BaseConfig.cmake delete mode 100644 cmake/Functions.cmake delete mode 100644 cmake/KitwareTools.cmake delete mode 100644 cmake/Options.cmake delete mode 100644 cmake/QtTools.cmake create mode 100644 cmake/cpPlg3rdParty.cmake create mode 100644 cmake/cpPlgDefinitions.cmake create mode 100644 cmake/cpPlgFunctions.cmake create mode 100644 cmake/cpPlgInstallCommands.cmake create mode 100644 cmake/cpPlgUninstall.cmake.in delete mode 100644 data/data.wxml delete mode 100644 data/read_write_image.wxml delete mode 100755 dependencies/cpPlugins_Install_CMAKE.sh delete mode 100644 dependencies/cpPlugins_Install_Dependencies.py delete mode 100755 dependencies/cpPlugins_Install_ITK.sh delete mode 100755 dependencies/cpPlugins_Install_QT4.sh delete mode 100755 dependencies/cpPlugins_Install_VTK.sh delete mode 100755 dependencies/cpPlugins_ThirdParty_Install_linux.sh delete mode 100644 dependencies/dependencies.py delete mode 100644 dependencies/qt-4.8.6_MAC.patch create mode 100644 docs/CMakeLists.txt create mode 100644 docs/Doxyfile.in create mode 100644 docs/uml/cpPlugins.dia delete mode 100755 install/macos/clean_libs.sh delete mode 100755 install/macos/prepare_libs.sh delete mode 100755 install/macos/relink_lib.sh delete mode 100644 lib/QCustomPlot/GPL.txt delete mode 100644 lib/QCustomPlot/QCustomPlot.cxx delete mode 100644 lib/QCustomPlot/QCustomPlot.h delete mode 100644 lib/QCustomPlot/changelog.txt create mode 100644 lib/TinyCon/CompletionConsole.cxx create mode 100644 lib/TinyCon/CompletionConsole.h create mode 100644 lib/TinyCon/Console.cxx create mode 100644 lib/TinyCon/Console.h create mode 100644 lib/TinyCon/README create mode 100644 lib/TinyCon/Trie.cxx create mode 100644 lib/TinyCon/Trie.h delete mode 100644 lib/cpBaseQtApplication/Blocker.cxx delete mode 100644 lib/cpBaseQtApplication/Blocker.h delete mode 100644 lib/cpBaseQtApplication/MainHelper.h delete mode 100644 lib/cpBaseQtApplication/MainWindow.cxx delete mode 100644 lib/cpBaseQtApplication/MainWindow.h delete mode 100644 lib/cpBaseQtApplication/Pipeline/Block.cxx delete mode 100644 lib/cpBaseQtApplication/Pipeline/Block.h delete mode 100644 lib/cpBaseQtApplication/Pipeline/Canvas.cxx delete mode 100644 lib/cpBaseQtApplication/Pipeline/Canvas.h delete mode 100644 lib/cpBaseQtApplication/Pipeline/Connection.cxx delete mode 100644 lib/cpBaseQtApplication/Pipeline/Connection.h delete mode 100644 lib/cpBaseQtApplication/Pipeline/EventFilter.cxx delete mode 100644 lib/cpBaseQtApplication/Pipeline/EventFilter.h delete mode 100644 lib/cpBaseQtApplication/Pipeline/Port.cxx delete mode 100644 lib/cpBaseQtApplication/Pipeline/Port.h delete mode 100644 lib/cpBaseQtApplication/Plugins/Navigator.cxx delete mode 100644 lib/cpBaseQtApplication/Plugins/Navigator.h delete mode 100644 lib/cpExtensions/Algorithms/BezierCurveFunction.h delete mode 100644 lib/cpExtensions/Algorithms/BezierCurveFunction.hxx delete mode 100644 lib/cpExtensions/Algorithms/CPRImageFilter.h delete mode 100644 lib/cpExtensions/Algorithms/CPRImageFilter.hxx delete mode 100644 lib/cpExtensions/Algorithms/DiscontinuityMapImageFilter.h delete mode 100644 lib/cpExtensions/Algorithms/DiscontinuityMapImageFilter.hxx delete mode 100644 lib/cpExtensions/Algorithms/FluxMedialness.h delete mode 100644 lib/cpExtensions/Algorithms/FluxMedialness.hxx delete mode 100644 lib/cpExtensions/Algorithms/GaussianDensityImageFilter.h delete mode 100644 lib/cpExtensions/Algorithms/GradientImageFunctionBase.h delete mode 100644 lib/cpExtensions/Algorithms/GradientImageFunctionBase.hxx delete mode 100644 lib/cpExtensions/Algorithms/GulsunTekMedialness.h delete mode 100644 lib/cpExtensions/Algorithms/GulsunTekMedialness.hxx delete mode 100644 lib/cpExtensions/Algorithms/ImageBlender.cxx delete mode 100644 lib/cpExtensions/Algorithms/ImageBlender.h delete mode 100644 lib/cpExtensions/Algorithms/ImageFunctionFilter.h delete mode 100644 lib/cpExtensions/Algorithms/ImageFunctionFilter.hxx delete mode 100644 lib/cpExtensions/Algorithms/ImageFunctorFilter.h delete mode 100644 lib/cpExtensions/Algorithms/ImageFunctorFilter.hxx delete mode 100644 lib/cpExtensions/Algorithms/ImageToBoundingBoxFromThreshold.h delete mode 100644 lib/cpExtensions/Algorithms/ImageToBoundingBoxFromThreshold.hxx delete mode 100644 lib/cpExtensions/Algorithms/InertiaMedialness.h delete mode 100644 lib/cpExtensions/Algorithms/InertiaTensorFunction.h delete mode 100644 lib/cpExtensions/Algorithms/IsoImageSlicer.h delete mode 100644 lib/cpExtensions/Algorithms/IsoImageSlicer.hxx delete mode 100644 lib/cpExtensions/Algorithms/IterativeGaussianModelEstimator.h delete mode 100644 lib/cpExtensions/Algorithms/IterativeGaussianModelEstimator.hxx delete mode 100644 lib/cpExtensions/Algorithms/KalmanConstantFilter.cxx delete mode 100644 lib/cpExtensions/Algorithms/KalmanConstantFilter.h delete mode 100644 lib/cpExtensions/Algorithms/KalmanFilter.cxx delete mode 100644 lib/cpExtensions/Algorithms/KalmanFilter.h delete mode 100644 lib/cpExtensions/Algorithms/KalmanFilter.hxx delete mode 100644 lib/cpExtensions/Algorithms/KalmanVelocityFilter.cxx delete mode 100644 lib/cpExtensions/Algorithms/KalmanVelocityFilter.h delete mode 100644 lib/cpExtensions/Algorithms/LightCompensationFilter.h delete mode 100644 lib/cpExtensions/Algorithms/LightCompensationFilter.hxx delete mode 100644 lib/cpExtensions/Algorithms/MFluxMedialness.h delete mode 100644 lib/cpExtensions/Algorithms/MFluxMedialness.hxx delete mode 100644 lib/cpExtensions/Algorithms/MacheteImageFilter.h delete mode 100644 lib/cpExtensions/Algorithms/MacheteImageFilter.hxx delete mode 100644 lib/cpExtensions/Algorithms/MultiScaleGaussianImageFilter.h delete mode 100644 lib/cpExtensions/Algorithms/MultiScaleGaussianImageFilter.hxx delete mode 100644 lib/cpExtensions/Algorithms/ParallelImageMean.h delete mode 100644 lib/cpExtensions/Algorithms/ParallelImageMean.hxx delete mode 100644 lib/cpExtensions/Algorithms/PolyLineParametricPathToSimple3DCurve.cxx delete mode 100644 lib/cpExtensions/Algorithms/PolyLineParametricPathToSimple3DCurve.h delete mode 100644 lib/cpExtensions/Algorithms/PolyLineParametricPathWriter.h delete mode 100644 lib/cpExtensions/Algorithms/PolyLineParametricPathWriter.hxx delete mode 100644 lib/cpExtensions/Algorithms/RGBExtractFunction.h delete mode 100644 lib/cpExtensions/Algorithms/RGBImageToOtherChannelsFilter.h delete mode 100644 lib/cpExtensions/Algorithms/RGBImageToOtherChannelsFilter.hxx delete mode 100644 lib/cpExtensions/Algorithms/RGBToHSVFunction.h delete mode 100644 lib/cpExtensions/Algorithms/RGBToSingleChannelFunctor.h delete mode 100644 lib/cpExtensions/Algorithms/RGBToSingleChannelFunctor.hxx delete mode 100644 lib/cpExtensions/Algorithms/RGBToYPbPrFunction.h delete mode 100644 lib/cpExtensions/Algorithms/RasterContourFilter.h delete mode 100644 lib/cpExtensions/Algorithms/RasterContourFilter.hxx delete mode 100644 lib/cpExtensions/Algorithms/RegionOfInterestImageCalculator.h delete mode 100644 lib/cpExtensions/Algorithms/RegionOfInterestImageCalculator.hxx delete mode 100644 lib/cpExtensions/Algorithms/SkeletonReader.h delete mode 100644 lib/cpExtensions/Algorithms/SkeletonReader.hxx delete mode 100644 lib/cpExtensions/Algorithms/SkeletonToImageFilter.h delete mode 100644 lib/cpExtensions/Algorithms/SkeletonToImageFilter.hxx delete mode 100644 lib/cpExtensions/Algorithms/SkeletonWriter.h delete mode 100644 lib/cpExtensions/Algorithms/SkeletonWriter.hxx delete mode 100644 lib/cpExtensions/Algorithms/SpatialObjectMaskImageFilter.h delete mode 100644 lib/cpExtensions/Algorithms/SpatialObjectMaskImageFilter.hxx delete mode 100644 lib/cpExtensions/Algorithms/UnaryThresholdImageFilter.h delete mode 100644 lib/cpExtensions/Algorithms/UnaryThresholdImageFilter.hxx delete mode 100644 lib/cpExtensions/Config.h.in delete mode 100644 lib/cpExtensions/DataStructures/Graph.h delete mode 100644 lib/cpExtensions/DataStructures/Graph.hxx delete mode 100644 lib/cpExtensions/DataStructures/PolyLineParametricPath.h delete mode 100644 lib/cpExtensions/DataStructures/PolyLineParametricPath.hxx delete mode 100644 lib/cpExtensions/DataStructures/Simple3DCurve.cxx delete mode 100644 lib/cpExtensions/DataStructures/Simple3DCurve.h delete mode 100644 lib/cpExtensions/DataStructures/Skeleton.h delete mode 100644 lib/cpExtensions/DataStructures/Skeleton.hxx delete mode 100644 lib/cpExtensions/Interaction/BaseStyle.cxx delete mode 100644 lib/cpExtensions/Interaction/BaseStyle.h delete mode 100644 lib/cpExtensions/Interaction/ImageSlicePointPlacer.cxx delete mode 100644 lib/cpExtensions/Interaction/ImageSlicePointPlacer.h delete mode 100644 lib/cpExtensions/Interaction/ImageSliceStyle.cxx delete mode 100644 lib/cpExtensions/Interaction/ImageSliceStyle.h delete mode 100644 lib/cpExtensions/Interaction/SeedWidget.cxx delete mode 100644 lib/cpExtensions/Interaction/SeedWidget.h delete mode 100644 lib/cpExtensions/QT/ActorsWidgetInterface.h delete mode 100644 lib/cpExtensions/QT/ConfigurationChooser.cxx delete mode 100644 lib/cpExtensions/QT/ConfigurationChooser.h delete mode 100644 lib/cpExtensions/QT/ConfigurationChooser.ui delete mode 100644 lib/cpExtensions/QT/ImageWidget.cxx delete mode 100644 lib/cpExtensions/QT/ImageWidget.h delete mode 100644 lib/cpExtensions/QT/MPR3DWidget.cxx delete mode 100644 lib/cpExtensions/QT/MPR3DWidget.h delete mode 100644 lib/cpExtensions/QT/MPRInteractionCommand.cxx delete mode 100644 lib/cpExtensions/QT/MPRInteractionCommand.h delete mode 100644 lib/cpExtensions/QT/RendererWidget.cxx delete mode 100644 lib/cpExtensions/QT/RendererWidget.h delete mode 100644 lib/cpExtensions/QT/SimpleMPRWidget.cxx delete mode 100644 lib/cpExtensions/QT/SimpleMPRWidget.h delete mode 100644 lib/cpExtensions/QT/SimpleMPRWidget.ui delete mode 100644 lib/cpExtensions/QT/WindowLevelImageConfiguration.cxx delete mode 100644 lib/cpExtensions/QT/WindowLevelImageConfiguration.h delete mode 100644 lib/cpExtensions/QT/WindowLevelImageConfiguration.ui delete mode 100644 lib/cpExtensions/Visualization/CursorActors.cxx delete mode 100644 lib/cpExtensions/Visualization/CursorActors.h delete mode 100644 lib/cpExtensions/Visualization/ImageActor.cxx delete mode 100644 lib/cpExtensions/Visualization/ImageActor.h delete mode 100644 lib/cpExtensions/Visualization/ImageIndexesContainerToPolyData.h delete mode 100644 lib/cpExtensions/Visualization/ImageIndexesContainerToPolyData.hxx delete mode 100644 lib/cpExtensions/Visualization/ImageOutlineActor.cxx delete mode 100644 lib/cpExtensions/Visualization/ImageOutlineActor.h delete mode 100644 lib/cpExtensions/Visualization/ImageOutlineSource.cxx delete mode 100644 lib/cpExtensions/Visualization/ImageOutlineSource.h delete mode 100644 lib/cpExtensions/Visualization/ImageSliceActors.cxx delete mode 100644 lib/cpExtensions/Visualization/ImageSliceActors.h delete mode 100644 lib/cpExtensions/Visualization/ImageSliceMapper.cxx delete mode 100644 lib/cpExtensions/Visualization/ImageSliceMapper.h delete mode 100644 lib/cpExtensions/Visualization/ImageViewerActors.cxx delete mode 100644 lib/cpExtensions/Visualization/ImageViewerActors.h delete mode 100644 lib/cpExtensions/Visualization/LUTImageActor.cxx delete mode 100644 lib/cpExtensions/Visualization/LUTImageActor.h delete mode 100644 lib/cpExtensions/Visualization/LineSource.cxx delete mode 100644 lib/cpExtensions/Visualization/LineSource.h delete mode 100644 lib/cpExtensions/Visualization/MPR3DActors.cxx delete mode 100644 lib/cpExtensions/Visualization/MPR3DActors.h delete mode 100644 lib/cpExtensions/Visualization/MeshActor.cxx delete mode 100644 lib/cpExtensions/Visualization/MeshActor.h delete mode 100644 lib/cpExtensions/Visualization/OutlineSource.cxx delete mode 100644 lib/cpExtensions/Visualization/OutlineSource.h delete mode 100644 lib/cpExtensions/Visualization/PolyLineParametricPathToPolyData.cxx delete mode 100644 lib/cpExtensions/Visualization/PolyLineParametricPathToPolyData.h delete mode 100644 lib/cpExtensions/Visualization/Simple3DCurveToPolyData.cxx delete mode 100644 lib/cpExtensions/Visualization/Simple3DCurveToPolyData.h delete mode 100644 lib/cpExtensions/Visualization/SkeletonToPolyData.cxx delete mode 100644 lib/cpExtensions/Visualization/SkeletonToPolyData.h delete mode 100644 lib/cpExtensions/Visualization/WindowLevelImageActor.cxx delete mode 100644 lib/cpExtensions/Visualization/WindowLevelImageActor.h delete mode 100644 lib/cpInstances/BaseObjects/ITKBaseObjects.i delete mode 100644 lib/cpInstances/BaseObjects/ITKBoundingBoxes.i delete mode 100644 lib/cpInstances/BaseObjects/ITKTransforms.i delete mode 100644 lib/cpInstances/CMakeLists.txt delete mode 100644 lib/cpInstances/DataObjects/BoundingBox.cxx delete mode 100644 lib/cpInstances/DataObjects/BoundingBox.h delete mode 100644 lib/cpInstances/DataObjects/Image.cxx delete mode 100644 lib/cpInstances/DataObjects/Image.d delete mode 100644 lib/cpInstances/DataObjects/Image.h delete mode 100644 lib/cpInstances/DataObjects/Mesh.cxx delete mode 100644 lib/cpInstances/DataObjects/Mesh.d delete mode 100644 lib/cpInstances/DataObjects/Mesh.h delete mode 100644 lib/cpInstances/DataObjects/PolyLineParametricPath.cxx delete mode 100644 lib/cpInstances/DataObjects/PolyLineParametricPath.d delete mode 100644 lib/cpInstances/DataObjects/PolyLineParametricPath.h delete mode 100644 lib/cpInstances/DataObjects/Simple3DCurve.cxx delete mode 100644 lib/cpInstances/DataObjects/Simple3DCurve.d delete mode 100644 lib/cpInstances/DataObjects/Simple3DCurve.h delete mode 100644 lib/cpInstances/DataObjects/Skeleton.cxx delete mode 100644 lib/cpInstances/DataObjects/Skeleton.d delete mode 100644 lib/cpInstances/DataObjects/Skeleton.h delete mode 100644 lib/cpInstances/Extensions/Paths.i delete mode 100644 lib/cpInstances/Extensions/Skeleton.i delete mode 100644 lib/cpInstances/Geometries/ITKMeshes.i delete mode 100644 lib/cpInstances/Geometries/ITKPaths.i delete mode 100644 lib/cpInstances/Images/ITK2VTKImageFilters.i delete mode 100644 lib/cpInstances/Images/ITKBoxImageFilters.i delete mode 100644 lib/cpInstances/Images/ITKImageFunctions.i delete mode 100644 lib/cpInstances/Images/ITKImageInterpolators.i delete mode 100644 lib/cpInstances/Images/ITKImages.i delete mode 100644 lib/cpInstances/Images/ITKImagesBaseFilters.i delete mode 100644 lib/cpInstances/Images/ITKImagesNeighborhoodIterators.i delete mode 100644 lib/cpInstances/Images/ITKImagesSimpleIterators.i delete mode 100644 lib/cpInstances/Images/itkImageToVTKImageFilter.h delete mode 100644 lib/cpInstances/Images/itkImageToVTKImageFilter.hxx delete mode 100644 lib/cpInstances/Images/itkVTKImageToImageFilter.h delete mode 100644 lib/cpInstances/Images/itkVTKImageToImageFilter.hxx create mode 100644 lib/cpPlugins/DataObject.cxx create mode 100644 lib/cpPlugins/DataObject.h create mode 100644 lib/cpPlugins/Filter.cxx create mode 100644 lib/cpPlugins/Filter.h create mode 100644 lib/cpPlugins/Functor.cxx create mode 100644 lib/cpPlugins/Functor.h delete mode 100644 lib/cpPlugins/Interface/Loader.cxx delete mode 100644 lib/cpPlugins/Interface/Loader.h delete mode 100644 lib/cpPlugins/Interface/Workspace.cxx delete mode 100644 lib/cpPlugins/Interface/Workspace.h delete mode 100644 lib/cpPlugins/Interface/WorkspaceIO.cxx create mode 100644 lib/cpPlugins/Library.cxx create mode 100644 lib/cpPlugins/Library.h create mode 100644 lib/cpPlugins/Manager.cxx create mode 100644 lib/cpPlugins/Manager.h delete mode 100644 lib/cpPlugins/OS/Chrono.h delete mode 100644 lib/cpPlugins/OS/DLLManager.cxx delete mode 100644 lib/cpPlugins/OS/DLLManager.h delete mode 100644 lib/cpPlugins/OS/FileSystem.cxx delete mode 100644 lib/cpPlugins/OS/FileSystem.h delete mode 100644 lib/cpPlugins/OS/String.cxx delete mode 100644 lib/cpPlugins/OS/String.h delete mode 100644 lib/cpPlugins/OS/tinydir.h delete mode 100644 lib/cpPlugins/OS/tinydir_COPYING.txt delete mode 100644 lib/cpPlugins/OS/tinydir_README.md.txt create mode 100644 lib/cpPlugins/Object.cxx create mode 100644 lib/cpPlugins/Object.h create mode 100644 lib/cpPlugins/Parameters.cxx.d create mode 100644 lib/cpPlugins/Parameters.h.d create mode 100644 lib/cpPlugins/Pipeline.cxx.d create mode 100644 lib/cpPlugins/Pipeline.h delete mode 100644 lib/cpPlugins/Pipeline/DataObject.cxx delete mode 100644 lib/cpPlugins/Pipeline/DataObject.h delete mode 100644 lib/cpPlugins/Pipeline/Events.h delete mode 100644 lib/cpPlugins/Pipeline/Functor.cxx delete mode 100644 lib/cpPlugins/Pipeline/Functor.h delete mode 100644 lib/cpPlugins/Pipeline/Object.cxx delete mode 100644 lib/cpPlugins/Pipeline/Object.h delete mode 100644 lib/cpPlugins/Pipeline/Parameters.cxx delete mode 100644 lib/cpPlugins/Pipeline/Parameters.h delete mode 100644 lib/cpPlugins/Pipeline/Port.cxx delete mode 100644 lib/cpPlugins/Pipeline/Port.h delete mode 100644 lib/cpPlugins/Pipeline/ProcessObject.cxx delete mode 100644 lib/cpPlugins/Pipeline/ProcessObject.h delete mode 100644 lib/cpPlugins/Pipeline/ProcessObject.hxx delete mode 100644 lib/cpPlugins/Pipeline/Widget.cxx delete mode 100644 lib/cpPlugins/Pipeline/Widget.h create mode 100644 lib/cpPlugins/Ports.cxx create mode 100644 lib/cpPlugins/Ports.h create mode 100644 lib/cpPlugins/ProcessObject.cxx create mode 100644 lib/cpPlugins/ProcessObject.h delete mode 100644 lib/cpPlugins/QT/OpenFileDialog.cxx delete mode 100644 lib/cpPlugins/QT/OpenFileDialog.h delete mode 100644 lib/cpPlugins/QT/ParametersDialog.cxx delete mode 100644 lib/cpPlugins/QT/ParametersDialog.h delete mode 100644 lib/cpPlugins/QT/SaveFileDialog.cxx delete mode 100644 lib/cpPlugins/QT/SaveFileDialog.h create mode 100644 lib/cpPlugins/Value.cxx.d create mode 100644 lib/cpPlugins/Value.e create mode 100644 lib/cpPlugins/Value.h.d create mode 100644 lib/cpPlugins/Version.cxx.in delete mode 100644 lib/cpPlugins/tinyxml2/OLD_CMakeLists.txt.old delete mode 100644 lib/cpPlugins/tinyxml2/readme.md delete mode 100644 lib/cpPlugins/tinyxml2/tinyxml2.cpp delete mode 100644 lib/cpPlugins/tinyxml2/tinyxml2.h create mode 100644 lib/cpPluginsBase/AppendRawDataFilter.cxx create mode 100644 lib/cpPluginsBase/AppendRawDataFilter.h create mode 100644 lib/cpPluginsBase/BinaryAddFunctor.cxx create mode 100644 lib/cpPluginsBase/BinaryAddFunctor.h create mode 100644 lib/cpPluginsBase/DataDemultiplexerFilter.cxx create mode 100644 lib/cpPluginsBase/DataDemultiplexerFilter.h create mode 100644 lib/cpPluginsBase/Host.plg create mode 100644 lib/cpPluginsBase/RandomNumberSource.cxx create mode 100644 lib/cpPluginsBase/RandomNumberSource.h create mode 100644 lib/cpPluginsBase/RawData.cxx create mode 100644 lib/cpPluginsBase/RawData.h create mode 100644 lib/cpPluginsBase/RawDataFunctor.cxx create mode 100644 lib/cpPluginsBase/RawDataFunctor.h create mode 100644 lib/cpPluginsBase/RawDataFunctorFilter.cxx create mode 100644 lib/cpPluginsBase/RawDataFunctorFilter.h create mode 100644 lib/cpPluginsBase/RawFileReader.cxx create mode 100644 lib/cpPluginsBase/RawFileReader.h create mode 100644 lib/cpPluginsBase/RawFileWriter.cxx create mode 100644 lib/cpPluginsBase/RawFileWriter.h create mode 100644 lib/cpPluginsBase/RotNRawDataFunctor.cxx create mode 100644 lib/cpPluginsBase/RotNRawDataFunctor.h create mode 100644 lib/mstch/mstch.cpp create mode 100644 lib/mstch/mstch.hpp create mode 100644 lib/mstch/render_context.cpp create mode 100644 lib/mstch/render_context.hpp create mode 100644 lib/mstch/state/in_section.cpp create mode 100644 lib/mstch/state/in_section.hpp create mode 100644 lib/mstch/state/outside_section.cpp create mode 100644 lib/mstch/state/outside_section.hpp create mode 100644 lib/mstch/state/render_state.hpp create mode 100644 lib/mstch/template_type.cpp create mode 100644 lib/mstch/template_type.hpp create mode 100644 lib/mstch/token.cpp create mode 100644 lib/mstch/token.hpp create mode 100644 lib/mstch/utils.cpp create mode 100644 lib/mstch/utils.hpp create mode 100644 lib/mstch/visitor/get_token.hpp create mode 100644 lib/mstch/visitor/has_token.hpp create mode 100644 lib/mstch/visitor/is_node_empty.hpp create mode 100644 lib/mstch/visitor/render_node.hpp create mode 100644 lib/mstch/visitor/render_section.hpp delete mode 100644 plugins/CMakeLists.txt delete mode 100644 plugins/GenericPlugins/DataReproducer.cxx delete mode 100644 plugins/GenericPlugins/DataReproducer.h delete mode 100644 plugins/GenericPlugins/JoinBoundingBoxes.cxx delete mode 100644 plugins/GenericPlugins/JoinBoundingBoxes.h delete mode 100644 plugins/IO/ImageJSkeletonWriter.cxx delete mode 100644 plugins/IO/ImageJSkeletonWriter.h delete mode 100644 plugins/ITKAnisotropicSmoothing/CurvatureAnisotropicDiffusionImageFilter.cxx delete mode 100644 plugins/ITKAnisotropicSmoothing/CurvatureAnisotropicDiffusionImageFilter.h delete mode 100644 plugins/ITKAnisotropicSmoothing/ITKAnisotropicSmoothing.i delete mode 100644 plugins/ITKBinaryFunctorFilters/BinaryArithmeticImageFilter.cxx delete mode 100644 plugins/ITKBinaryFunctorFilters/BinaryArithmeticImageFilter.h delete mode 100644 plugins/ITKBinaryFunctorFilters/BinaryBooleanImageFilter.cxx delete mode 100644 plugins/ITKBinaryFunctorFilters/BinaryBooleanImageFilter.h delete mode 100644 plugins/ITKBinaryFunctorFilters/ITKBinaryFunctorFilters.i delete mode 100644 plugins/ITKDistanceMapFilters/BinaryContourImageFilter.cxx delete mode 100644 plugins/ITKDistanceMapFilters/BinaryContourImageFilter.h delete mode 100644 plugins/ITKDistanceMapFilters/ITKDistanceMapFilters.i delete mode 100644 plugins/ITKDistanceMapFilters/SignedMaurerDistanceMapImageFilter.cxx delete mode 100644 plugins/ITKDistanceMapFilters/SignedMaurerDistanceMapImageFilter.h delete mode 100644 plugins/ITKFiniteDifference/ITKFiniteDifference.i delete mode 100644 plugins/ITKIO/DicomSeriesReader.cxx delete mode 100644 plugins/ITKIO/DicomSeriesReader.h delete mode 100644 plugins/ITKIO/DicomSeriesReaderQDialog.h delete mode 100644 plugins/ITKIO/DicomSeriesReaderQDialog.ui delete mode 100644 plugins/ITKIO/DicomSeriesSelectorWidget.cxx delete mode 100644 plugins/ITKIO/DicomSeriesSelectorWidget.h delete mode 100644 plugins/ITKIO/DicomSeriesSelectorWidget.ui delete mode 100644 plugins/ITKIO/ITKIO.i delete mode 100644 plugins/ITKIO/ImageReader.cxx delete mode 100644 plugins/ITKIO/ImageReader.h delete mode 100644 plugins/ITKIO/ImageWriter.cxx delete mode 100644 plugins/ITKIO/ImageWriter.h delete mode 100644 plugins/ITKImageGenericFilters_1/CastImageFilter.cxx delete mode 100644 plugins/ITKImageGenericFilters_1/CastImageFilter.h delete mode 100644 plugins/ITKImageGenericFilters_1/ITKImageGenericFilters_1.i delete mode 100644 plugins/ITKImageGenericFilters_1/ImageToBoundingBoxFromThreshold.cxx delete mode 100644 plugins/ITKImageGenericFilters_1/ImageToBoundingBoxFromThreshold.h delete mode 100644 plugins/ITKImageGenericFilters_1/MinimumMaximumImageCalculator.cxx delete mode 100644 plugins/ITKImageGenericFilters_1/MinimumMaximumImageCalculator.h delete mode 100644 plugins/ITKImageGenericFilters_1/RegionOfInterestImageFilter.cxx delete mode 100644 plugins/ITKImageGenericFilters_1/RegionOfInterestImageFilter.h delete mode 100644 plugins/ITKImageInterpolators/BSplineInterpolateImageFunction.cxx delete mode 100644 plugins/ITKImageInterpolators/BSplineInterpolateImageFunction.h delete mode 100644 plugins/ITKImageInterpolators/ITKImageInterpolators.i delete mode 100644 plugins/ITKImageInterpolators/InterpolateImageFunction.cxx delete mode 100644 plugins/ITKImageInterpolators/InterpolateImageFunction.h delete mode 100644 plugins/ITKImageInterpolators/LinearInterpolateImageFunction.cxx delete mode 100644 plugins/ITKImageInterpolators/LinearInterpolateImageFunction.h delete mode 100644 plugins/ITKLevelSetFilters/ITKLevelSetFilters.i delete mode 100644 plugins/ITKLevelSetFilters/LaplacianSegmentationLevelSetImageFilter.cxx delete mode 100644 plugins/ITKLevelSetFilters/LaplacianSegmentationLevelSetImageFilter.h delete mode 100644 plugins/ITKLevelSetFilters/ThresholdSegmentationLevelSetImageFilter.cxx delete mode 100644 plugins/ITKLevelSetFilters/ThresholdSegmentationLevelSetImageFilter.h delete mode 100644 plugins/ITKMorphology/ITKMorphology.i delete mode 100644 plugins/ITKNeighborhoodOperatorFilters/ITKNeighborhoodOperatorFilters.i delete mode 100644 plugins/ITKParaMorphology/BinaryDilateParaImageFilter.cxx delete mode 100644 plugins/ITKParaMorphology/BinaryDilateParaImageFilter.h delete mode 100644 plugins/ITKParaMorphology/BinaryErodeParaImageFilter.cxx delete mode 100644 plugins/ITKParaMorphology/BinaryErodeParaImageFilter.h delete mode 100644 plugins/ITKParaMorphology/ITKParaMorphology.i delete mode 100644 plugins/ITKRasterFilters/ITKRasterFilters.i delete mode 100644 plugins/ITKRasterFilters/RasterImageFilter.cxx delete mode 100644 plugins/ITKRasterFilters/RasterImageFilter.h delete mode 100644 plugins/ITKSeparableFilters/ITKSeparableFilters.i delete mode 100644 plugins/ITKSeparableFilters/SmoothingRecursiveGaussianImageFilter.cxx delete mode 100644 plugins/ITKSeparableFilters/SmoothingRecursiveGaussianImageFilter.h delete mode 100644 plugins/ITKSliceFilters/CPRImageFilter.cxx delete mode 100644 plugins/ITKSliceFilters/CPRImageFilter.h delete mode 100644 plugins/ITKSliceFilters/ITKSliceFilters.i delete mode 100644 plugins/ITKSliceFilters/IsoResampleImageFilter.cxx delete mode 100644 plugins/ITKSliceFilters/IsoResampleImageFilter.h delete mode 100644 plugins/ITKUnaryFunctorFilters/AbsImageFilter.cxx delete mode 100644 plugins/ITKUnaryFunctorFilters/AbsImageFilter.h delete mode 100644 plugins/ITKUnaryFunctorFilters/BinaryThresholdImageFilter.cxx delete mode 100644 plugins/ITKUnaryFunctorFilters/BinaryThresholdImageFilter.h delete mode 100644 plugins/ITKUnaryFunctorFilters/ITKUnaryFunctorFilters.i delete mode 100644 plugins/ITKUnaryFunctorFilters/InvertIntensityImageFilter.cxx delete mode 100644 plugins/ITKUnaryFunctorFilters/InvertIntensityImageFilter.h delete mode 100644 plugins/ITKUnaryFunctorFilters/UnaryBooleanImageFilter.cxx delete mode 100644 plugins/ITKUnaryFunctorFilters/UnaryBooleanImageFilter.h delete mode 100644 plugins/ITKUnaryFunctorFilters/UnaryThresholdImageFilter.cxx delete mode 100644 plugins/ITKUnaryFunctorFilters/UnaryThresholdImageFilter.h delete mode 100644 plugins/VTKFilters/CylinderSource.cxx delete mode 100644 plugins/VTKFilters/CylinderSource.h delete mode 100644 plugins/VTKFilters/MarchingCubes.cxx delete mode 100644 plugins/VTKFilters/MarchingCubes.h delete mode 100644 plugins/VTKFilters/SphereSource.cxx delete mode 100644 plugins/VTKFilters/SphereSource.h delete mode 100644 plugins/VTKIO/MeshReader.cxx delete mode 100644 plugins/VTKIO/MeshReader.h delete mode 100644 plugins/VTKIO/MeshWriter.cxx delete mode 100644 plugins/VTKIO/MeshWriter.h delete mode 100644 plugins/VTKWidgets/LineWidget.cxx delete mode 100644 plugins/VTKWidgets/LineWidget.h delete mode 100644 plugins/VTKWidgets/SeedWidget.cxx delete mode 100644 plugins/VTKWidgets/SeedWidget.h delete mode 100644 plugins/VTKWidgets/SplineWidget.cxx delete mode 100644 plugins/VTKWidgets/SplineWidget.h delete mode 100644 plugins/change.csv delete mode 100644 plugins/cpExtensions/DiscontinuityMapImageFilter.cxx delete mode 100644 plugins/cpExtensions/DiscontinuityMapImageFilter.h delete mode 100644 plugins/cpExtensions/ImageFunctorFilter.cxx delete mode 100644 plugins/cpExtensions/ImageFunctorFilter.h delete mode 100644 plugins/cpExtensions/PolyLineParametricPathToPolyData.cxx delete mode 100644 plugins/cpExtensions/PolyLineParametricPathToPolyData.h delete mode 100644 plugins/cpExtensions/PolyLineParametricPathToSimple3DCurve.cxx delete mode 100644 plugins/cpExtensions/PolyLineParametricPathToSimple3DCurve.h delete mode 100644 plugins/cpExtensions/PolyLineParametricPathWriter.cxx delete mode 100644 plugins/cpExtensions/PolyLineParametricPathWriter.h delete mode 100644 plugins/cpExtensions/SkeletonReader.cxx delete mode 100644 plugins/cpExtensions/SkeletonReader.h delete mode 100644 plugins/cpExtensions/SkeletonToImageFilter.cxx delete mode 100644 plugins/cpExtensions/SkeletonToImageFilter.h delete mode 100644 plugins/cpExtensions/SkeletonWriter.cxx delete mode 100644 plugins/cpExtensions/SkeletonWriter.h delete mode 100644 plugins/cpExtensions/cpExtensions.i delete mode 100644 tools/CMakeLists.txt delete mode 100644 tools/ExecutePipeline.cxx delete mode 100644 tools/PrintDirInfo.cxx delete mode 100644 tools/PrintFileInfo.cxx delete mode 100644 tools/PrintGuessInfo.cxx delete mode 100644 tools/RenameImageFile.cxx diff --git a/CMakeLists.txt b/CMakeLists.txt index d584f6e..99c90f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,50 +1,41 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.0) - -## ======================== -## == Project definition == -## ======================== - -SET(prj_NAME cpPlugins) -SET(prj_MAJ_VERSION 0) -SET(prj_MIN_VERSION 1) -SET(prj_REL_VERSION 0) -SET(_subdirs cmake bash lib tools plugins appli) -SET(_policies CMP0015 CMP0020 CMP0042) - -## ========================== -## == Some useful policies == -## ========================== - -FOREACH(_p ${_policies}) - IF(POLICY ${_p}) - CMAKE_POLICY(SET ${_p} NEW) - ENDIF(POLICY ${_p}) -ENDFOREACH(_p) - -## =========================== -## == Project configuration == -## =========================== - -PROJECT(${prj_NAME}) -SET(prj_VERSION"${prj_MAJ_VERSION}.${prj_MIN_VERSION}.${prj_REL_VERSION}") -SET(prj_SHORT_VERSION "${prj_MAJ_VERSION}") - -## ===================================== -## == Functions, packages and options == -## ===================================== - -INCLUDE(cmake/BaseConfig.cmake) -INCLUDE(cmake/Options.cmake) -INCLUDE(cmake/KitwareTools.cmake) -INCLUDE(cmake/QtTools.cmake) -INCLUDE(cmake/Functions.cmake) - -## =========================== -## == Build different parts == -## =========================== - -FOREACH(_s ${_subdirs}) - SUBDIRS(${_s}) -ENDFOREACH(_s) +## ========================================================================= +## @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) +## ========================================================================= + +## == Base project configuration +cmake_minimum_required(VERSION 3.0) +set(prj_NAME cpPlugins) +set(prj_MAJ 1) +set(prj_MIN 0) +set(prj_REL 0) + +## == Project definiton +project(${prj_NAME} VERSION "${prj_MAJ}.${prj_MIN}.${prj_REL}") +include(cmake/cpPlgDefinitions.cmake) +include(cmake/cpPlgFunctions.cmake) + +## == User could want only cmake scripts +option(cpPlugins_BUILD "Build targets?" OFF) +if(cpPlugins_BUILD) + + ## == Options + option(BUILD_PLUGINS_cpPluginsBase "Build base plugins?" OFF) + + ## == Find Boost + find_package(Boost REQUIRED COMPONENTS filesystem program_options) + + ## == Find Qt5 + find_package(Qt5 CONFIG REQUIRED COMPONENTS Widgets) + set(CMAKE_INCLUDE_CURRENT_DIR ON) + set(CMAKE_AUTOMOC ON) + + ## == Process subdirs + subdirs(appli lib) + +endif(cpPlugins_BUILD) +include(cmake/cpPlgInstallCommands.cmake) + +## == Prepare CMake scripts +subdirs(cmake) ## eof - $RCSfile$ diff --git a/README.md b/README.md new file mode 100644 index 0000000..9e5569b --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# cpPlugins +Plugin system to create structured (image, meshes) data processing and visualization pipelines. + +## eof - $RCSfile$ diff --git a/appli/CMakeLists.txt b/appli/CMakeLists.txt index 414db20..91a12eb 100644 --- a/appli/CMakeLists.txt +++ b/appli/CMakeLists.txt @@ -1,10 +1,7 @@ +## ========================================================================= +## @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) +## ========================================================================= -## =================================== -## == One directory per application == -## =================================== - -SUBDIRS( - PipelineEditor - ) +subdirs(bash examples) ## eof - $RCSfile$ diff --git a/appli/PipelineEditor/CMakeLists.txt b/appli/PipelineEditor/CMakeLists.txt index 11b7d77..0659fd9 100644 --- a/appli/PipelineEditor/CMakeLists.txt +++ b/appli/PipelineEditor/CMakeLists.txt @@ -1,14 +1,21 @@ -IF(BUILD_QT4_COMPONENTS) - INCLUDE_DIRECTORIES( - ${PROJECT_SOURCE_DIR}/lib - ${PROJECT_BINARY_DIR}/lib - ${PROJECT_SOURCE_DIR}/appli/PipelineEditor - ${PROJECT_BINARY_DIR}/appli/PipelineEditor - ) - cpPlugins_BuildApplication(PipelineEditor ${CMAKE_CURRENT_SOURCE_DIR}) - IF(BUILD_PipelineEditor) - TARGET_LINK_LIBRARIES(PipelineEditor cpBaseQtApplication) - ENDIF(BUILD_PipelineEditor) -ENDIF(BUILD_QT4_COMPONENTS) +## ========================================================================= +## @author: Leonardo Florez-Valencia (florez-l@javeriana.edu.co) +## ========================================================================= + +if(BUILD_PLUGINS_cpPluginsBase) + option(cpPlugins_BUILD_PipelineEditor "" OFF) + if(cpPlugins_BUILD_PipelineEditor) + cpPlugins_BuildApplication( + cpPlugins_PipelineEditor + RECURRENT INSTALL + SOURCES . + INCLUDES + ${PROJECT_BINARY_DIR}/appli + ${PROJECT_BINARY_DIR}/lib + ${PROJECT_SOURCE_DIR}/lib + LINKS Qt5::Widgets cpPlugins + ) + endif(cpPlugins_BUILD_PipelineEditor) +endif(BUILD_PLUGINS_cpPluginsBase) ## eof - $RCSfile$ diff --git a/appli/PipelineEditor/PipelineEditor.cxx b/appli/PipelineEditor/PipelineEditor.cxx index c55920f..05dee60 100644 --- a/appli/PipelineEditor/PipelineEditor.cxx +++ b/appli/PipelineEditor/PipelineEditor.cxx @@ -1,157 +1,53 @@ -#include -#include +// ========================================================================= +// @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) +// ========================================================================= -#include -#include -#include -#include -#include -#include +#include "PipelineEditor.h" +#include // ------------------------------------------------------------------------- PipelineEditor:: -PipelineEditor( int argc, char* argv[], QWidget* parent ) - : Superclass( argc, argv, parent ), - m_UI( new Ui::PipelineEditor ) +PipelineEditor( QWidget* parent ) + : QMainWindow( parent ), + Ui::PipelineEditor( ) { - // Basic configuration - this->m_BaseWindowTitle = "PipelineEditor - "; - this->m_UI->setupUi( this ); - this->setCanvas( this->m_UI->Canvas ); - this->setNavigator( this->m_UI->Navigator ); - this->m_UI->Navigator->Update( ); - - // Connect slots <-> signals - cpBaseQtApplication_ConnectAction( actionLoadDirectory, _loadPluginsFromPath ); - cpBaseQtApplication_ConnectAction( actionLoadLibrary, _loadPlugins ); - cpBaseQtApplication_ConnectAction( actionOpenWorkspace, _loadWorkspace ); - cpBaseQtApplication_ConnectAction( actionSaveWorkspace, _saveWorkspace ); - cpBaseQtApplication_ConnectAction( actionSaveWorkspaceAs, _saveWorkspace ); - cpBaseQtApplication_ConnectAction( actionActorsProperties, _actorsProperties ); - this->m_UI->Canvas->connectOutputPortSlot( - this, SLOT( _slotView( const std::string&, bool ) ) - ); - this->connect( - this->m_UI->actionPrintExecutionInformation, SIGNAL( triggered( bool ) ), - this, SLOT( _slotPrintExecutionInformation( bool ) ) - ); - - // Load command-line given workspace (if any) - if( argc > 1 ) - this->_loadWorkspace( argv[ 1 ] ); + this->setupUi( this ); } // ------------------------------------------------------------------------- PipelineEditor:: ~PipelineEditor( ) { - delete this->m_UI; } // ------------------------------------------------------------------------- -void PipelineEditor:: -_slotView( const std::string& name, bool show ) -{ - typedef cpExtensions::QT::ActorsWidgetInterface _TViewer; - - // Get filter parameters - std::vector< std::string > tokens = - cpPlugins::OS::String::Tokenize( name, "@" ); - if( tokens.size( ) != 2 ) - return; - auto filter_name = tokens[ 1 ]; - auto output_name = tokens[ 0 ]; - - // Process data - if( show ) - { - try - { - auto ws = this->workspace( ); - auto filter = ws->GetFilter( filter_name ); - cpBaseQtApplication_Execute( filter->Update( ) ); - auto image = filter->GetOutputData< vtkImageData >( output_name ); - auto mesh = filter->GetOutputData< vtkPolyData >( output_name ); - _TViewer* viewer = NULL; - if( image != NULL ) - { - int dim = image->GetDataDimension( ); - if( dim == 2 ) - viewer = - this->_configureViewer< cpExtensions::QT::ImageWidget >( - this->m_UI->Viewer - ); - else if( dim == 3 ) - viewer = - this->_configureViewer< cpExtensions::QT::SimpleMPRWidget >( - this->m_UI->Viewer - ); - } - else if( mesh != NULL ) - { - viewer = - this->_configureViewer< cpExtensions::QT::SimpleMPRWidget >( - this->m_UI->Viewer - ); - - } // fi - if( - dynamic_cast< QWidget* >( viewer ) != - dynamic_cast< QWidget* >( this->m_UI->Viewer ) && - viewer != NULL - ) - { - delete this->m_UI->Viewer; - this->m_UI->Viewer = dynamic_cast< QWidget* >( viewer ); - this->m_UI->MainSplitter->insertWidget( 0, this->m_UI->Viewer ); - this->setViewer( viewer ); - - } // fi - if( image != NULL ) - { - this->m_Blocker.block( ); - auto mpr = dynamic_cast< cpExtensions::QT::SimpleMPRWidget* >( viewer ); - auto imv = dynamic_cast< cpExtensions::QT::ImageWidget* >( viewer ); - if( mpr != NULL ) - mpr->SetImage( image, name ); - else if( imv != NULL ) - imv->SetImage( image, name ); - this->m_Blocker.unblock( ); - } - else if( mesh != NULL ) - { - this->m_Blocker.block( ); - auto mpr = dynamic_cast< cpExtensions::QT::SimpleMPRWidget* >( viewer ); - if( mpr != NULL ) - mpr->Add( mesh, name ); - this->m_Blocker.unblock( ); +#include +#include +#include - } // fi - } - catch( std::exception& err ) - { - QMessageBox::critical( - NULL, - QMessageBox::tr( "Error showing data" ), - QMessageBox::tr( err.what( ) ) - ); - - } // yrt - - } // fi -} - -// ------------------------------------------------------------------------- -void PipelineEditor:: -_slotPrintExecutionInformation( bool show ) +int main( int argc, char* argv[] ) { - if( this->m_Workspace.IsNotNull( ) ) - this->m_Workspace->SetPrintExecution( show ); + // TODO: Q_INIT_RESOURCE(application); + + QApplication app( argc, argv ); + QCoreApplication::setOrganizationName( "Creatis-PUJ" ); + QCoreApplication::setApplicationName( "cpPlugins_PipelineEditor" ); + QCoreApplication::setApplicationVersion( "1.0.0" ); + + QCommandLineParser parser; + parser.setApplicationDescription( QCoreApplication::applicationName( ) ); + parser.addHelpOption( ); + parser.addVersionOption( ); + parser.addPositionalArgument( "file", "The file to open." ); + parser.process( app ); + + PipelineEditor win; + /* TODO + if( !parser.positionalArguments( ).isEmpty( ) ) + win.loadFile( parser.positionalArguments( ).first( ) ); + */ + win.show( ); + return( app.exec( ) ); } -// ------------------------------------------------------------------------- -#include -cpBaseQtApplication_Main( PipelineEditor ); -cpBaseQtApplication_MainComplement; - // eof - $RCSfile$ diff --git a/appli/PipelineEditor/PipelineEditor.h b/appli/PipelineEditor/PipelineEditor.h index 1b6674e..f8fb229 100644 --- a/appli/PipelineEditor/PipelineEditor.h +++ b/appli/PipelineEditor/PipelineEditor.h @@ -1,36 +1,28 @@ -#ifndef __PipelineEditor__h__ -#define __PipelineEditor__h__ +// ========================================================================= +// @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) +// ========================================================================= +#ifndef __cpPlugins__appli__PipelineEditor__PipelineEditor__h__ +#define __cpPlugins__appli__PipelineEditor__PipelineEditor__h__ #include -#include +#include +#include -namespace Ui { class PipelineEditor; } - -/** - */ class PipelineEditor - : public cpBaseQtApplication::MainWindow + : public QMainWindow, + private Ui::PipelineEditor { Q_OBJECT; -public: - typedef PipelineEditor Self; - typedef cpBaseQtApplication::MainWindow Superclass; public: - explicit PipelineEditor( - int argc, char* argv[], - QWidget* parent = NULL - ); + explicit PipelineEditor( QWidget* parent = NULL ); virtual ~PipelineEditor( ); -protected slots: - void _slotView( const std::string& name, bool show ); - void _slotPrintExecutionInformation( bool show ); - private: - Ui::PipelineEditor* m_UI; + std::string m_HomeDir; + cpPlugins::Interface::Manager m_Mgr; }; -#endif // __PipelineEditor__h__ +#endif // __cpPlugins__appli__PipelineEditor__PipelineEditor__h__ // eof - $RCSfile$ diff --git a/appli/PipelineEditor/PipelineEditor.ui b/appli/PipelineEditor/PipelineEditor.ui index 0e61512..bbb1b09 100644 --- a/appli/PipelineEditor/PipelineEditor.ui +++ b/appli/PipelineEditor/PipelineEditor.ui @@ -6,163 +6,89 @@ 0 0 - 800 - 600 + 640 + 480 - PipelineEditor + cpPlugins PipelineEditor - v1.0 - + - - 2 - - - 2 - - + - Qt::Vertical + Qt::Horizontal - - - - Qt::Horizontal - - - - + + - + 0 0 - 800 - 25 + 640 + 22 &File - - - + + + + - - - &Properties - - - - - - Plu&gins - - - - - - - - - - - toolBar - - - TopToolBarArea - - - false - - + E&xit - + - &Open workspace + &Open Ctrl+O - + - &Save workspace + &Save Ctrl+S - + - Sa&ve workspace as... - - - Ctrl+Shift+S + &Close - + - &Actors + Sa&ve as... - Ctrl+Shift+P - - - - - Load &library - - - Ctrl+Shift+L - - - - - Load &directory - - - Ctrl+Shift+D - - - - - true - - - Print execution information? - - - Print execution information? + Ctrl+Shift+S - cpBaseQtApplication::Plugins::Navigator - QWidget -
cpBaseQtApplication/Plugins/Navigator.h
- 1 -
- - cpBaseQtApplication::Pipeline::Canvas + PluginsNavigator QWidget -
cpBaseQtApplication/Pipeline/Canvas.h
+
PluginsNavigator.h
1
@@ -179,8 +105,8 @@ -1 - 399 - 299 + 319 + 239 diff --git a/appli/PipelineEditor/PluginsNavigator.cxx b/appli/PipelineEditor/PluginsNavigator.cxx new file mode 100644 index 0000000..305d746 --- /dev/null +++ b/appli/PipelineEditor/PluginsNavigator.cxx @@ -0,0 +1,88 @@ +// ========================================================================= +// @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) +// ========================================================================= + +#include "PluginsNavigator.h" +#include + +// ------------------------------------------------------------------------- +PluginsNavigator:: +PluginsNavigator( QWidget* parent ) + : Superclass( parent ) +{ + this->m_PlgMgr.Configure( ); + + this->setDragEnabled( true ); + this->setDragDropMode( QAbstractItemView::DragOnly ); + this->setAlternatingRowColors( true ); + this->Update( ); +} + +// ------------------------------------------------------------------------- +PluginsNavigator:: +~PluginsNavigator( ) +{ +} + +// ------------------------------------------------------------------------- +void PluginsNavigator:: +Update( ) +{ + this->_Clear( ); + this->_Update( ); +} + +// ------------------------------------------------------------------------- +void PluginsNavigator:: +_Clear( ) +{ + this->clear( ); + this->setColumnCount( 1 ); + QString header_txt = "Plugins"; + if( QTreeWidgetItem* header = this->headerItem( ) ) + header->setText( 0, header_txt ); + else + this->setHeaderLabel( header_txt ); +} + +// ------------------------------------------------------------------------- +void PluginsNavigator:: +_Update( ) +{ + typedef boost::char_separator< char > _TSep; + typedef boost::tokenizer< _TSep > _TTok; + typedef cpPlugins::Interface::Manager::TPlugins _TPlugins; + typedef _TPlugins::value_type _TPlg; + + for( const _TPlg& plg: this->m_PlgMgr.GetPlugins( ) ) + { + _TSep sep{ ":" }; + _TTok tokens{ plg.first, sep }; + QTreeWidgetItem* cat = NULL; + for( const std::string& t: tokens ) + { + QList< QTreeWidgetItem* > cat_items; + + /* TODO + if( cat != NULL ) + cat_items = + cat->findItems( t.c_str( ), Qt::MatchExactly | Qt::MatchRecursive ); + else + */ + cat_items = + this->findItems( t.c_str( ), Qt::MatchExactly | Qt::MatchRecursive ); + if( cat_items.size( ) == 0 ) + { + bool prev = ( cat == NULL ); + cat = new QTreeWidgetItem( cat, QStringList( t.c_str( ) ) ); + if( prev ) + this->addTopLevelItem( cat ); + } + else + cat = cat_items[ 0 ]; + } // rof + } // rof + this->expandAll( ); +} + +// eof - $RCSfile$ diff --git a/appli/PipelineEditor/PluginsNavigator.h b/appli/PipelineEditor/PluginsNavigator.h new file mode 100644 index 0000000..3e21c12 --- /dev/null +++ b/appli/PipelineEditor/PluginsNavigator.h @@ -0,0 +1,37 @@ +// ========================================================================= +// @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) +// ========================================================================= +#ifndef __cpPlugins__appli__PipelineEditor__PluginsNavigator__h__ +#define __cpPlugins__appli__PipelineEditor__PluginsNavigator__h__ + +#include +#include + +/** + */ +class PluginsNavigator + : public QTreeWidget +{ + Q_OBJECT; + +public: + typedef PluginsNavigator Self; + typedef QTreeWidget Superclass; + +public: + explicit PluginsNavigator( QWidget* parent = NULL ); + virtual ~PluginsNavigator( ); + + void Update( ); + +protected: + void _Clear( ); + void _Update( ); + +protected: + cpPlugins::Interface::Manager m_PlgMgr; +}; + +#endif // __cpPlugins__appli__PipelineEditor__PluginsNavigator__h__ + +// eof - $RCSfile$ diff --git a/appli/bash/CMakeLists.txt b/appli/bash/CMakeLists.txt new file mode 100644 index 0000000..e375e7a --- /dev/null +++ b/appli/bash/CMakeLists.txt @@ -0,0 +1,34 @@ +## ========================================================================= +## @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) +## ========================================================================= + +cpPlugins_BuildExecutable( + cpPlugins_MOC + INSTALL + SOURCES MOC.cxx + INCLUDES ${PROJECT_SOURCE_DIR}/lib ${PROJECT_BINARY_DIR}/lib + LINKS ${Boost_LIBRARIES} cpPlugins_mstch + ) + +cpPlugins_BuildExecutable( + cpPlugins_HostCreator + INSTALL + SOURCES HostCreator.cxx + LINKS ${Boost_LIBRARIES} + ) + +cpPlugins_BuildExecutable( + cpPlugins_InteractivePipelineCreator + INSTALL + SOURCES InteractivePipelineCreator.cxx.d + LINKS cpPlugins_TinyCon cpPlugins + ) + +cpPlugins_BuildExecutable( + cpPlugins_ExecutePipeline + INSTALL + SOURCES ExecutePipeline.cxx + LINKS cpPlugins + ) + +## eof - $RCSfile$ diff --git a/appli/bash/ExecutePipeline.cxx b/appli/bash/ExecutePipeline.cxx new file mode 100644 index 0000000..a293c3a --- /dev/null +++ b/appli/bash/ExecutePipeline.cxx @@ -0,0 +1,143 @@ +// ========================================================================= +// @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) +// ========================================================================= + +#include +#include +#include +#include +#include + +int main( int argc, char* argv[] ) +{ + typedef cpPlugins::Pipeline TPipeline; + namespace bpo = boost::program_options; + + // Declare the supported options. + bpo::options_description d( "Allowed options" ); + d.add_options( ) + ( "help,h", "produce help message" ) + ( "interactive,i", bpo::bool_switch( )->default_value( false ), "Run an interactive menu to configure pipeline" ) + ( "overwrite,o", bpo::bool_switch( )->default_value( false ), "Overwrite XML file" ) + ( "contents,c", bpo::bool_switch( )->default_value( false ), "Print pipeline contents" ) + ( "value,v", bpo::value< std::vector< std::string > >( ), "Parameter values" ) + ( "pipeline,p", bpo::value< std::string >( )->required( ), "Pipeline file" ) + ; + bpo::positional_options_description p; + p.add( "pipeline", -1 ); + + // Parse input arguments + bpo::variables_map v; + try + { + bpo::store( + bpo:: + command_line_parser( argc, argv ).options( d ).positional( p ).run( ), + v + ); + bpo::notify( v ); + if( v.count( "help" ) > 0 ) + { + std::cerr << d << std::endl; + return( 0 ); + + } // fi + } + catch( std::exception& err ) + { + std::cerr << "Error caught: " << err.what( ) << std::endl; + std::cerr << d << std::endl; + return( 1 ); + + } // yrt + + try + { + // Load pipeline + TPipeline::SharedPtr pipeline = TPipeline::New( ); + pipeline->ExecutionDebugOn( ); + pipeline->LoadXML( v[ "pipeline" ].as< std::string >( ) ); + + // Configure pipeline + if( v.count( "value" ) > 0 ) + { + for( + const std::string& pv: + v[ "value" ].as< std::vector< std::string > >( ) + ) + { + std::size_t b = pv.find_first_of( "=" ); + pipeline->SetInValue( pv.substr( 0, b ), pv.substr( b + 1 ) ); + + } // rof + + } // fi + + // Just print pipeline contents + if( v[ "contents" ].as< bool >( ) ) + { + /* TODO + TPipeline::TParametersMap pmap = pipeline->GetParametersMap( ); + TPipeline::TParametersMap::const_iterator pIt; + for( pIt = pmap.begin( ); pIt != pmap.end( ); ++pIt ) + { + std::cout + << pIt->first << " (" + << pIt->second.first << "=" + << pIt->second.second << ")" + << std::endl; + + } // rof + */ + return( 0 ); + + } // fi + + // Interactively configure pipeline + if( v[ "interactive" ].as< bool >( ) ) + { + std::cout << "** Interactively configuring pipeline **" << std::endl; + /* TODO + TPipeline::TParametersMap pmap = pipeline->GetParametersMap( ); + TPipeline::TParametersMap::const_iterator pIt; + for( pIt = pmap.begin( ); pIt != pmap.end( ); ++pIt ) + { + std::cout + << pIt->first << " (" + << pIt->second.first << "=" + << pIt->second.second << "): " + << std::ends; + std::string line; + std::getline( std::cin, line ); + if( line != "" ) + { + std::size_t p = pIt->first.find( "@" ); + pipeline->SetParameter( + pIt->first.substr( p + 1 ), + pIt->first.substr( 0, p ), + line + ); + + } // fi + + } // rof + */ + } // fi + + // Execute pipeline + pipeline->Update( ); + + // Save pipeline + if( v[ "overwrite" ].as< bool >( ) ) + pipeline->SaveXML( v[ "pipeline" ].as< std::string >( ) ); + } + catch( std::exception& err ) + { + std::cerr << "ERROR CAUGHT: " << err.what( ) << std::endl; + return( 1 ); + + } // yrt + return( 0 ); +} + +// eof - $RCSfile$ diff --git a/appli/bash/HostCreator.cxx b/appli/bash/HostCreator.cxx new file mode 100644 index 0000000..3e30159 --- /dev/null +++ b/appli/bash/HostCreator.cxx @@ -0,0 +1,249 @@ +// ========================================================================= +// @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) +// ========================================================================= + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +// ------------------------------------------------------------------------- +typedef boost::filesystem::path TPath; +typedef std::vector< std::string > TStrings; +struct TData +{ + TPath Input; + TPath Output; + TStrings Lines; +}; +TData Data; + +// ------------------------------------------------------------------------- +bool Arguments( int argc, char* argv[] ); +bool Read( const std::string& input, std::string& buffer ); +bool Lines( const std::string& input, TStrings& lines ); +int Parse( ); + +// ------------------------------------------------------------------------- +int main( int argc, char* argv[] ) +{ + if( Arguments( argc, argv ) ) + { + if( Lines( Data.Input.string( ), Data.Lines ) ) + return( Parse( ) ); + else + return( 1 ); + } + else + return( 1 ); +} + +// ------------------------------------------------------------------------- +bool Arguments( int argc, char* argv[] ) +{ + // Declare the supported options. + boost::program_options::options_description desc( "Allowed options" ); + desc.add_options( ) + ( "help,h", "produce help message" ) + ( + "input,i", + boost::program_options::value< std::string >( ), + "Input" + ) + ( + "output,o", + boost::program_options::value< std::string >( ), + "Output" + ) + ; + + try + { + // Parse input arguments + boost::program_options::variables_map vm; + boost::program_options::store( + boost::program_options::parse_command_line( argc, argv, desc ), vm + ); + boost::program_options::notify( vm ); + if( vm.count( "help" ) ) + { + std::cerr << desc << std::endl; + return( false ); + + } // fi + if( vm.count( "input" ) == 0 || vm.count( "output" ) == 0 ) + { + std::cerr + << "Invalid usage: --input and --output are required." + << std::endl << desc << std::endl; + return( false ); + + } // fi + + // Get values + Data.Input = + boost::filesystem::canonical( + TPath( vm[ "input" ].as< std::string >( ) ) + ); + Data.Output = TPath( vm[ "output" ].as< std::string >( ) ); + return( true ); + } + catch( std::exception& err ) + { + std::cerr + << "===============================" << std::endl + << "Error caught: " << err.what( ) << std::endl + << "===============================" << std::endl + << std::endl; + std::cerr << desc << std::endl; + return( false ); + + } // yrt +} + +// ------------------------------------------------------------------------- +bool Read( const std::string& input, std::string& buffer ) +{ + std::ifstream in( input.c_str( ) ); + if( !in ) + { + std::cerr + << "===============================" << std::endl + << "Error caught: " << std::endl + << "could not load input file \"" << input << "\"" << std::endl + << "===============================" << std::endl + << std::endl; + return( false ); + + } // fi + typedef std::istreambuf_iterator< char > _TDIt; + std::istringstream str( std::string( ( _TDIt( in ) ), _TDIt( ) ) ); + buffer = str.str( ); + in.close( ); + return( true ); +} + +// ------------------------------------------------------------------------- +bool Lines( const std::string& input, TStrings& lines ) +{ + std::string buffer; + if( Read( input, buffer ) ) + { + lines.clear( ); + std::istringstream str( buffer ); + std::string line; + while( std::getline( str, line ) ) + lines.push_back( line ); + return( true ); + } + else + return( false ); +} + +// ------------------------------------------------------------------------- +int Parse( ) +{ + typedef boost::char_separator< char > _TSep; + typedef boost::tokenizer< _TSep > _TTok; + + std::set< std::string > classes; + std::set< std::string > includes; + for( const std::string& line: Data.Lines ) + { + _TSep sep( " \t" ); + _TTok tokens( line, sep ); + _TTok::const_iterator tIt = tokens.begin( ); + std::size_t s = std::distance( tIt, tokens.end( ) ); + if( s > 0 ) + { + std::string class_name = *tIt; + if( class_name[ 0 ] == '@' ) + { + classes.insert( class_name.substr( 1 ) ); + if( s == 1 ) + { + boost::algorithm::replace_all( class_name, "::", "/" ); + class_name[ 0 ] = '<'; + class_name += std::string( ".h>" ); + includes.insert( class_name ); + } + else if( s > 1 ) + for( tIt++; tIt != tokens.end( ); ++tIt ) + includes.insert( *tIt ); + } // end if + } // end if + } // end for + + // Create buffer + std::stringstream oBuff; + oBuff + << "// Automatically generated, please do not edit." + << std::endl << std::endl; + oBuff + << "#include " << std::endl + << "#include " << std::endl; + for( const std::string& s: includes ) + oBuff << "#include " << s << std::endl; + oBuff + << std::endl + << "extern \"C\" void* cpPlugins_Create( const char* name )" + << std::endl + << "{" << std::endl + << " static std::shared_ptr< cpPlugins::ProcessObject > ptr;" + << std::endl << " " + << " std::string sName = name;" << std::endl << " "; + for( const std::string& s: classes ) + { + oBuff + << "if( sName == \"" << s << "\" )" << std::endl + << " {" << std::endl + << " " << s << "::SharedPtr p = " << s << "::New( );" + << std::endl + << " ptr = p->CastSharedPtr< cpPlugins::ProcessObject >( );" + << std::endl + << " }" << std::endl + << " else "; + + } // rof + oBuff + << std::endl << " {" << std::endl + << " return( NULL );" + << std::endl << " }" << std::endl; + + oBuff + << " return( reinterpret_cast< void* >( &ptr ) );" << std::endl + << "}" << std::endl; + + oBuff << std::endl << "// eof" << std::endl; + + // Save file + std::ofstream out( Data.Output.string( ).c_str( ) ); + if( out ) + { + out << oBuff.str( ); + out.close( ); + } + else + { + std::cerr + << "===============================" << std::endl + << "Error caught: " << std::endl + << "could not write output file \"" << Data.Output.string( ) + << "\"" << std::endl + << "===============================" << std::endl + << std::endl; + return( 1 ); + + } // fi + return( 0 ); +} + +// eof - $RCSfile$ diff --git a/appli/bash/InteractivePipelineCreator.cxx.d b/appli/bash/InteractivePipelineCreator.cxx.d new file mode 100644 index 0000000..0a72019 --- /dev/null +++ b/appli/bash/InteractivePipelineCreator.cxx.d @@ -0,0 +1,319 @@ +// ========================================================================= +// @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) +// ========================================================================= + +$cmd=help;list;exit;create;describe;define;save;load;connect + +#include +#include +#include + +// ------------------------------------------------------------------------- +class Console + : public TinyCon::CompletionConsole +{ +public: + typedef Console Self; + typedef TinyCon::CompletionConsole Superclass; + + typedef cpPlugins::Manager TManager; + typedef cpPlugins::Pipeline TPipeline; + typedef cpPlugins::ProcessObject TProcessObject; + typedef cpPlugins::Filter TFilter; + typedef cpPlugins::Functor TFunctor; + typedef TManager::TPlugins TPlugins; + +public: + Console( const std::string& prompt ); + virtual ~Console( ); + + virtual int trigger( const std::vector< std::string >& args ) override; + + bool _cmd_help( const std::vector< std::string >& args ); + bool _cmd_list( const std::vector< std::string >& args ); + bool _cmd_exit( const std::vector< std::string >& args ); + bool _cmd_create( const std::vector< std::string >& args ); + bool _cmd_describe( const std::vector< std::string >& args ); + bool _cmd_define( const std::vector< std::string >& args ); + bool _cmd_save( const std::vector< std::string >& args ); + bool _cmd_load( const std::vector< std::string >& args ); + bool _cmd_connect( const std::vector< std::string >& args ); + +protected: + TTrie* m_CommandsTrie; + TTrie* m_PluginsTrie; + TTrie* m_InputsTrie; + TTrie* m_OutputsTrie; + + TManager m_Manager; + TPipeline::SharedPtr m_Pipeline; +}; + +// ------------------------------------------------------------------------- +int main( int argc, char* argv[] ) +{ + std::cout << "Welcome to cpPlugins' interactive creator" << std::endl; + Console console( "> " ); + console.run( ); + return( 0 ); +} + +// ------------------------------------------------------------------------- +Console:: +Console( const std::string& prompt ) + : Superclass( prompt ) +{ + + // Add base commands and prepare help + this->m_CommandsTrie = new TTrie( ); + {{#cmd}} + this->addCommand( "{{cmd}}" ); + this->m_CommandsTrie->insert( "{{cmd}}" ); + {{/cmd}} + this->addCommand( "help", this->m_CommandsTrie ); + + // Add "create" options + this->m_PluginsTrie = new TTrie( ); + this->m_Manager.Configure( ); + for( const TPlugins::value_type& p: this->m_Manager.GetPlugins( ) ) + this->m_PluginsTrie->insert( p.first ); + this->addCommand( "create", this->m_PluginsTrie ); + + // Add "connect" options + this->m_InputsTrie = new TTrie( ); + this->m_OutputsTrie = new TTrie( ); + this->addCommand( "connect", this->m_OutputsTrie ); + + // Prepare pipeline + this->m_Pipeline = TPipeline::New( ); +} + +// ------------------------------------------------------------------------- +Console:: +~Console( ) +{ + /* TODO + delete this->m_CommandsTrie; + delete this->m_PluginsTrie; + delete this->m_InputsTrie; + delete this->m_OutputsTrie; + */ +} + +// ------------------------------------------------------------------------- +int Console:: +trigger( const std::vector< std::string >& args ) +{ + {{#cmd}} + if( args[ 0 ] == "{{cmd}}" ) + return( ( this->_cmd_{{cmd}}( args ) )? 0: 1 ); + else + {{/cmd}} + return( 0 ); +} + +// ------------------------------------------------------------------------- +bool Console:: +_cmd_help( const std::vector< std::string >& args ) +{ + return( true ); +} + +// ------------------------------------------------------------------------- +bool Console:: +_cmd_list( const std::vector< std::string >& args ) +{ + std::cout << this->m_Manager << std::endl; + return( true ); +} + +// ------------------------------------------------------------------------- +bool Console:: +_cmd_exit( const std::vector< std::string >& args ) +{ + this->quit( ); + return( false ); +} + +// ------------------------------------------------------------------------- +bool Console:: +_cmd_create( const std::vector< std::string >& args ) +{ + // Get arguments + std::string nClass = ""; + std::string nName = ""; + if( args.size( ) > 1 ) + { + nClass = args[ 1 ]; + if( args.size( ) > 2 ) + nName = args[ 2 ]; + + TProcessObject* p = + this->m_Pipeline->Cast< cpPlugins::Pipeline >( )-> + CreateNode( nClass, nName ); + if( p != NULL ) + { + // Prepare "describe" command + this->addCommand( "describe", p->GetName( ) ); + + // Prepare "connect" command + std::set< std::string > iNames = p->GetAllInputsNames( ); + for( const std::string& s: iNames ) + this->m_InputsTrie->insert( p->GetName( ) + "%" + s ); + std::set< std::string > oNames = p->GetAllOutputsNames( ); + for( const std::string& s: oNames ) + this->m_OutputsTrie->insert( p->GetName( ) + "%" + s )-> + setExtension( this->m_InputsTrie ); + + // Show some information + std::cout + << "Node \"" << p->GetName( ) << "\" of type \"" + << p->GetClassName( ) << "\" created." << std::endl; + } + else + std::cout << "Could not create node." << std::endl; + } + else + std::cout + << "Invalid \"create\" command: create nClass [nName]" + << std::endl; + return( true ); +} + +// ------------------------------------------------------------------------- +bool Console:: +_cmd_describe( const std::vector< std::string >& args ) +{ + if( args.size( ) > 1 ) + { + TProcessObject* p = + this->m_Pipeline->Cast< cpPlugins::Pipeline >( )->GetNode( args[ 1 ] ); + if( p != NULL ) + p->Print( std::cout ); + else + std::cout + << "Node \"" << args[ 1 ] << "\" does not exists." + << std::endl; + } + else + std::cout + << "Invalid \"describe\" command: describe nName" + << std::endl; + return( true ); +} + +// ------------------------------------------------------------------------- +bool Console:: +_cmd_define( const std::vector< std::string >& args ) +{ + if( args.size( ) > 3 ) + { + if( args[ 1 ] == "input" ) + { + std::cout << "TODO input" << std::endl; + } + else if( args[ 1 ] == "output" ) + { + std::cout << "TODO output" << std::endl; + } + else + std::cout + << "Invalid \"define\" command: define [input/output] Port%Node node" + << std::endl; + /* TODO + TProcessObject* p = + this->m_Pipeline->Cast< cpPlugins::Pipeline >( )->GetNode( args[ 1 ] ); + if( p != NULL ) + p->Print( std::cout ); + else + std::cout + << "Node \"" << args[ 1 ] << "\" does not exists." + << std::endl; + */ + } + else + std::cout + << "Invalid \"define\" command: define [input/output] Port%Node node" + << std::endl; + return( true ); +} + +// ------------------------------------------------------------------------- +bool Console:: +_cmd_save( const std::vector< std::string >& args ) +{ + if( args.size( ) > 1 ) + { + try + { + this->m_Pipeline->Cast< TPipeline >( )->SaveXML( args[ 1 ] ); + } + catch( std::exception& err ) + { + std::cout << "Error caught: " << err.what( ) << std::endl; + } // end try + } + else + std::cout + << "Invalid \"save\" command: save filename" + << std::endl; + return( true ); +} + +// ------------------------------------------------------------------------- +bool Console:: +_cmd_load( const std::vector< std::string >& args ) +{ + if( args.size( ) > 1 ) + { + try + { + this->m_Pipeline->Cast< TPipeline >( )->LoadXML( args[ 1 ] ); + + // TODO: update tries!!! + } + catch( std::exception& err ) + { + std::cout << "Error caught: " << err.what( ) << std::endl; + } // end try + } + else + std::cout + << "Invalid \"save\" command: save filename" + << std::endl; + return( true ); +} + +// ------------------------------------------------------------------------- +bool Console:: +_cmd_connect( const std::vector< std::string >& args ) +{ + std::size_t oPos = args[ 1 ].find_first_of( "%" ); + std::size_t dPos = args[ 2 ].find_first_of( "%" ); + std::string oObj = args[ 1 ].substr( 0, oPos ); + std::string dObj = args[ 2 ].substr( 0, dPos ); + std::string oPort = args[ 1 ].substr( oPos + 1 ); + std::string dPort = args[ 2 ].substr( dPos + 1 ); + + try + { + this->m_Pipeline->Cast< TPipeline >( )->Connect( + args[ 1 ].substr( 0, oPos ), + args[ 2 ].substr( 0, dPos ), + args[ 1 ].substr( oPos + 1 ), + args[ 2 ].substr( dPos + 1 ) + ); + } + catch( std::exception& err ) + { + std::cout << "Error caught: " << err.what( ) << std::endl; + } // end try + std::cout + << "Connection between \"" << args[ 1 ] + << "\" and \"" << args[ 2 ] << "\" done!" + << std::endl; + + return( true ); +} + +// eof - $RCSfile$ diff --git a/appli/bash/MOC.cxx b/appli/bash/MOC.cxx new file mode 100644 index 0000000..8052b05 --- /dev/null +++ b/appli/bash/MOC.cxx @@ -0,0 +1,438 @@ +// ========================================================================= +// @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) +// ========================================================================= + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +// ------------------------------------------------------------------------- +typedef boost::filesystem::path TPath; +typedef std::vector< std::string > TStrings; +typedef std::map< std::string, TStrings > TDefinitions; +struct TData +{ + TPath Input; + TPath Output; + std::set< TPath > IncludePaths; + TStrings InputLines; + TStrings CompleteLines; + TDefinitions Definitions; +}; +TData Data; + +// ------------------------------------------------------------------------- +bool Arguments( int argc, char* argv[] ); +bool Read( const std::string& input, std::string& buffer ); +bool Lines( const std::string& input, TStrings& lines ); +void Includes( TStrings& new_lines, const TStrings& lines ); +void Definitions( TDefinitions& defs, const TStrings& lines ); +int Parse( ); +void Render( std::ostream& out, const std::string& in, mstch::map& context ); + +// ------------------------------------------------------------------------- +int main( int argc, char* argv[] ) +{ + if( Arguments( argc, argv ) ) + { + if( Lines( Data.Input.string( ), Data.InputLines ) ) + { + Includes( Data.CompleteLines, Data.InputLines ); + Definitions( Data.Definitions, Data.CompleteLines ); + return( Parse( ) ); + } + else + return( 1 ); + } + else + return( 1 ); +} + +// ------------------------------------------------------------------------- +bool Arguments( int argc, char* argv[] ) +{ + // Declare the supported options. + boost::program_options::options_description desc( "Allowed options" ); + desc.add_options( ) + ( "help,h", "produce help message" ) + ( + "input,i", + boost::program_options::value< std::string >( ), + "Input" + ) + ( + "output,o", + boost::program_options::value< std::string >( ), + "Output" + ) + ( + "include,I", + boost::program_options::value< TStrings >( ), + "Include directory(ies)" + ) + ; + + try + { + // Parse input arguments + boost::program_options::variables_map vm; + boost::program_options::store( + boost::program_options::parse_command_line( argc, argv, desc ), vm + ); + boost::program_options::notify( vm ); + if( vm.count( "help" ) ) + { + std::cerr << desc << std::endl; + return( false ); + + } // fi + if( vm.count( "input" ) == 0 || vm.count( "output" ) == 0 ) + { + std::cerr + << "Invalid usage: --input and --output are required." + << std::endl << desc << std::endl; + return( false ); + + } // fi + + // Get values + Data.Input = + boost::filesystem::canonical( + TPath( vm[ "input" ].as< std::string >( ) ) + ); + Data.Output = TPath( vm[ "output" ].as< std::string >( ) ); + Data.IncludePaths.clear( ); + Data.IncludePaths.insert( Data.Input.parent_path( ) ); + if( vm.count( "include" ) > 0 ) + for( const std::string& dir: vm[ "include" ].as< TStrings >( ) ) + Data.IncludePaths.insert( boost::filesystem::canonical( TPath( dir ) ) ); + return( true ); + } + catch( std::exception& err ) + { + std::cerr << "Error caught: " << err.what( ) << std::endl; + std::cerr << desc << std::endl; + return( false ); + + } // yrt +} + +// ------------------------------------------------------------------------- +bool Read( const std::string& input, std::string& buffer ) +{ + std::ifstream in( input.c_str( ) ); + if( !in ) + { + std::cerr + << "===============================" << std::endl + << "Error caught: " << std::endl + << "could not load input file \"" << input << "\"" << std::endl + << "===============================" << std::endl + << std::endl; + return( false ); + + } // fi + typedef std::istreambuf_iterator< char > _TDIt; + std::istringstream str( std::string( ( _TDIt( in ) ), _TDIt( ) ) ); + buffer = str.str( ); + in.close( ); + return( true ); +} + +// ------------------------------------------------------------------------- +bool Lines( const std::string& input, TStrings& lines ) +{ + std::string buffer; + if( Read( input, buffer ) ) + { + lines.clear( ); + std::istringstream str( buffer ); + std::string line; + while( std::getline( str, line ) ) + lines.push_back( line ); + return( true ); + } + else + return( false ); +} + +// ------------------------------------------------------------------------- +void Includes( TStrings& new_lines, const TStrings& lines ) +{ + bool ok = true; + new_lines.clear( ); + for( const std::string& line: lines ) + { + std::size_t a = line.find_first_of( "$" ); + std::size_t b = line.find( "$include", a ); + if( a == b && a != std::string::npos ) + { + std::size_t s = line.find_first_of( "\"" ); + std::size_t l = line.find_last_of( "\"" ); + std::string fname = line.substr( s + 1, l - s - 1 ); + std::set< TPath >::const_iterator pIt = Data.IncludePaths.begin( ); + bool found = false; + while( pIt != Data.IncludePaths.end( ) && !found ) + { + TPath incl = *pIt; + incl /= fname; + if( boost::filesystem::exists( incl ) ) + { + TStrings incl_lines; + if( Lines( incl.string( ), incl_lines ) ) + { + for( const std::string& l: incl_lines ) + { + if( l.find( "$include" ) != std::string::npos ) + ok = false; + new_lines.push_back( l ); + + } // rof + + } // fi + found = true; + + } // fi + pIt++; + + } // elihw + } + else + new_lines.push_back( line ); + + } // rof + + if( !ok ) + { + TStrings new_new_lines; + Includes( new_new_lines, new_lines ); + new_lines = new_new_lines; + + } // fi +} + +// ------------------------------------------------------------------------- +void Definitions( TDefinitions& defs, const TStrings& lines ) +{ + // Tokenizer + typedef boost::char_separator< char > _TSep; + typedef boost::tokenizer< _TSep > _TTok; + + // Identify definitions + for( const std::string& line: lines ) + { + std::size_t a = line.find_first_not_of( " \t" ); + if( a != std::string::npos ) + { + if( line[ a ] == '$' ) + { + _TTok tokens( line, _TSep( "=;" ) ); + _TTok::const_iterator t = tokens.begin( ); + std::string d = *t + "$"; + + std::pair< TDefinitions::iterator, bool > i = + defs.insert( TDefinitions::value_type( d, TStrings( ) ) ); + if( i.second ) + { + for( ++t; t != tokens.end( ); ++t ) + i.first->second.push_back( *t ); + if( i.first->second.size( ) == 0 ) + defs.erase( i.first ); + } + else + throw std::runtime_error( "Duplicated defition: " + d ); + + } // fi + + } // fi + + } // rof + + // Expand definitions + bool stop = false; + while( !stop ) + { + // Change all possible values + for( TDefinitions::value_type& d: defs ) + { + TStrings nValues; + for( const std::string& v: d.second ) + { + std::size_t a = v.find_first_of( "$" ); + if( a != std::string::npos ) + { + std::size_t b = v.find_first_of( "$", a + 1 ); + std::string c = v.substr( a, b - a + 1 ); + TDefinitions::const_iterator cIt = defs.find( c ); + if( cIt != defs.end( ) ) + { + for( std::string cV: cIt->second ) + { + std::string vnew = v; + boost::algorithm::replace_all( vnew, c, cV ); + nValues.push_back( vnew ); + + } // rof + + } // fi + } + else + nValues.push_back( v ); + + } // rof + d.second = nValues; + + } // rof + + // Check stop + stop = true; + for( TDefinitions::value_type& d: defs ) + { + for( const std::string& v: d.second ) + stop &= ( v.find_first_of( "$" ) == std::string::npos ); + + } // rof + + } // elihw + + // Clear definitions + TDefinitions::iterator dIt = defs.begin( ); + while( dIt != defs.end( ) ) + { + if( dIt->second.size( ) == 0 ) + { + TDefinitions::iterator eIt = dIt; + dIt++; + defs.erase( eIt ); + } + else + dIt++; + + } // elihw +} + +// ------------------------------------------------------------------------- +int Parse( ) +{ + // Parse lines + std::stringstream lines; + for( const std::string& line: Data.InputLines ) + { + // Check if a this is a definition line + std::size_t a = line.find_first_of( "$" ); + std::size_t b = line.find_first_of( "=" ); + bool ok = true; + if( a != std::string::npos && b != std::string::npos ) + { + std::string c = line.substr( a, b - a ) + "$"; + if( Data.Definitions.find( c ) != Data.Definitions.end( ) ) + ok = false; + + } // fi + + if( a != std::string::npos ) + { + if( a == line.find( "$include", a ) ) + ok = false; + + } // fi + + if( ok ) + { + std::string t = line; + + std::set< std::string > tags; + for( const TDefinitions::value_type& d: Data.Definitions ) + { + if( line.find( d.first ) != std::string::npos ) + tags.insert( d.first ); + + } // rof + + if( tags.size( ) > 0 ) + { + std::stringstream pre, pos; + std::set< std::string >::const_iterator tIt = tags.begin( ); + std::set< std::string >::const_reverse_iterator rtIt = tags.rbegin( ); + for( ; tIt != tags.end( ); ++tIt, ++rtIt ) + { + pre << "{{#" << tIt->substr( 1, tIt->size( ) - 2 ) << "}}"; + pos << "{{/" << rtIt->substr( 1, rtIt->size( ) - 2 ) << "}}"; + boost::algorithm::replace_all( + t, *tIt, "{{" + tIt->substr( 1, tIt->size( ) - 2 ) + "}}" + ); + + } // rof + pre << std::endl << t << std::endl << pos.str( ); + t = pre.str( ); + + } // fi + lines << t << std::endl; + + } // fi + + } // rof + + + // Create moustache context + typedef std::pair< std::string, std::string > TStringPair; + typedef std::pair< std::string, mstch::array > TStringArrayPair; + mstch::map context; + for( const TDefinitions::value_type& d: Data.Definitions ) + { + mstch::array values; + std::string c = d.first.substr( 1, d.first.size( ) - 2 ); + for( const std::string& v: d.second ) + { + mstch::map def; + def.insert( TStringPair( c, v ) ); + values.push_back( def ); + + } // rof + context.insert( TStringArrayPair( c, values ) ); + + } // rof + + // Parse moustache syntax and save output file + std::ofstream out( Data.Output.string( ).c_str( ) ); + if( !out ) + { + std::cerr + << "===============================" << std::endl + << "Error caught: " << std::endl + << "could not save to output file \"" << Data.Output.string( ) + << "\"" << std::endl + << "===============================" << std::endl + << std::endl; + return( 1 ); + + } // fi + + Render( out, lines.str( ), context ); + out << std::endl; + out.close( ); + return( 0 ); +} + +// ------------------------------------------------------------------------- +void Render( std::ostream& out, const std::string& in, mstch::map& context ) +{ + std::string s = mstch::render( in, context ); + boost::algorithm::replace_all( s, "<", "<" ); + boost::algorithm::replace_all( s, ">", ">" ); + out << s; +} + +// eof - $RCSfile$ diff --git a/appli/examples/CMakeLists.txt b/appli/examples/CMakeLists.txt new file mode 100644 index 0000000..5e71ab7 --- /dev/null +++ b/appli/examples/CMakeLists.txt @@ -0,0 +1,29 @@ +## ========================================================================= +## @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) +## ========================================================================= + +option(cpPlugins_BUILD_EXAMPLES "Build examples?" OFF) +if(cpPlugins_BUILD_EXAMPLES) + set( + _examples + Parameters + ReadRawFile_00 + ReadRawFile_01 + ReadRawFile_02 + ReadWriteRawFile_00 + ReadWriteRawFile_01 + ReadWriteRawFile_02 + ComplexAppend + ) + foreach(_e ${_examples}) + cpPlugins_BuildExecutable( + example_${_e} + SOURCES ${_e}.cxx + INCLUDES ${PROJECT_SOURCE_DIR}/lib ${PROJECT_BINARY_DIR}/lib + LINKS cpPlugins cpPluginsBase + ) + + endforeach(_e) +endif(cpPlugins_BUILD_EXAMPLES) + +## eof - $RCSfile$ diff --git a/appli/examples/ComplexAppend.cxx b/appli/examples/ComplexAppend.cxx new file mode 100644 index 0000000..bae9874 --- /dev/null +++ b/appli/examples/ComplexAppend.cxx @@ -0,0 +1,88 @@ +// ========================================================================= +// @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) +// ========================================================================= + +#include +#include +#include + +int main( int argc, char* argv[] ) +{ + if( argc != 7 ) + { + std::cerr << "Usage: " << argv[ 0 ] << " input output" << std::endl; + return( 1 ); + } // end if + + try + { + typedef cpPlugins::Pipeline TPipeline; + + TPipeline::SharedPtr pipeline = TPipeline::New( ); + + cpPlugins::Filter* r1 = + pipeline->CreateNode( "cpPluginsBase::RawFileReader", "r1" )-> + Cast< cpPlugins::Filter >( ); + + cpPlugins::Filter* r2 = + pipeline->CreateNode( "cpPluginsBase::RawFileReader", "r2" )-> + Cast< cpPlugins::Filter >( ); + + cpPlugins::Filter* r3 = + pipeline->CreateNode( "cpPluginsBase::RawFileReader", "r3" )-> + Cast< cpPlugins::Filter >( ); + + cpPlugins::Filter* r4 = + pipeline->CreateNode( "cpPluginsBase::RawFileReader", "r4" )-> + Cast< cpPlugins::Filter >( ); + + cpPlugins::Filter* r5 = + pipeline->CreateNode( "cpPluginsBase::RawFileReader", "r5" )-> + Cast< cpPlugins::Filter >( ); + + cpPlugins::Filter* a1 = + pipeline->CreateNode( "cpPluginsBase::AppendRawDataFilter", "a1" )-> + Cast< cpPlugins::Filter >( ); + + cpPlugins::Filter* a2 = + pipeline->CreateNode( "cpPluginsBase::AppendRawDataFilter", "a2" )-> + Cast< cpPlugins::Filter >( ); + + cpPlugins::Filter* a3 = + pipeline->CreateNode( "cpPluginsBase::AppendRawDataFilter", "a3" )-> + Cast< cpPlugins::Filter >( ); + + cpPlugins::Filter* w = + pipeline->CreateNode( "cpPluginsBase::RawFileWriter", "w" )-> + Cast< cpPlugins::Filter >( ); + + a1->SetInput( "Input", r1->GetOutput( "Output" ) ); + a1->SetInput( "Input", r2->GetOutput( "Output" ) ); + + a2->SetInput( "Input", a1->GetOutput( "Output" ) ); + a2->SetInput( "Input", r3->GetOutput( "Output" ) ); + a2->SetInput( "Input", r4->GetOutput( "Output" ) ); + + a3->SetInput( "Input", a2->GetOutput( "Output" ) ); + a3->SetInput( "Input", r5->GetOutput( "Output" ) ); + + w->SetInput( "Input", a3->GetOutput( "Output" ) ); + + r1->SetInValue( "FileName", std::string( argv[ 1 ] ) ); + r2->SetInValue( "FileName", std::string( argv[ 2 ] ) ); + r3->SetInValue( "FileName", std::string( argv[ 3 ] ) ); + r4->SetInValue( "FileName", std::string( argv[ 4 ] ) ); + r5->SetInValue( "FileName", std::string( argv[ 5 ] ) ); + w->SetInValue( "FileName", std::string( argv[ 6 ] ) ); + + w->Update( ); + } + catch( std::exception& err ) + { + std::cerr << "ERROR CAUGHT: " << err.what( ) << std::endl; + return( 1 ); + } // end try + return( 0 ); +} + +// eof - $RCSfile$ diff --git a/appli/examples/Parameters.cxx b/appli/examples/Parameters.cxx new file mode 100644 index 0000000..ee19b49 --- /dev/null +++ b/appli/examples/Parameters.cxx @@ -0,0 +1,56 @@ +// ========================================================================= +// @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) +// ========================================================================= + +#include +#include + +int main( int argc, char* argv[] ) +{ + cpPlugins::Parameters p; + + /* TODO + p.SetInValue( "a", 9.0 ); + p.SetInValue( "b", true ); + p.SetInValue( "c", 7 ); + p.SetInValue( "d", -8 ); + p.SetInValue( "e", std::string( "Hello world!" ) ); + + p.ConfigureInputSet< bool >( "f" ); + p.ConfigureInputSet< char >( "g" ); + p.ConfigureInputSet< short >( "h" ); + p.ConfigureInputSet< int >( "i" ); + p.ConfigureInputSet< long >( "j" ); + p.ConfigureInputSet< unsigned char >( "k" ); + p.ConfigureInputSet< unsigned short >( "l" ); + p.ConfigureInputSet< unsigned int >( "m" ); + p.ConfigureInputSet< unsigned long >( "n" ); + p.ConfigureInputSequence< float >( "o" ); + p.ConfigureInputSet< double >( "p" ); + p.ConfigureInputSet< std::string >( "q" ); + + p.AddToInputSet( "f", true ); + p.AddToInputSet( "f", false ); + p.AddToInputSet( "f", true ); + p.AddToInputSet( "g", 'z' ); + p.AddToInputSet( "g", 'b' ); + p.AddToInputSet( "g", 'c' ); + p.AddToInputSet( "g", 'a' ); + p.AddToInputSet( "g", 'b' ); + p.AddToInputSet( "g", 'a' ); + p.AddToInputSet( "q", std::string( "hello" ) ); + p.AddToInputSet( "q", std::string( "world" ) ); + p.AddToInputSet( "q", std::string( "!" ) ); + p.AddToInputSequence( "o", -1 ); + p.AddToInputSequence( "o", 2.1 ); + p.AddToInputSequence( "o", -3.2 ); + p.AddToInputSequence( "o", 4.3 ); + p.AddToInputSequence( "o", -5.4 ); + p.AddToInputSequence( "o", 6.5 ); + + std::cout << p << std::endl; + */ + return( 0 ); +} + +// eof - $RCSfile$ diff --git a/appli/examples/ReadRawFile_00.cxx b/appli/examples/ReadRawFile_00.cxx new file mode 100644 index 0000000..8881190 --- /dev/null +++ b/appli/examples/ReadRawFile_00.cxx @@ -0,0 +1,36 @@ +// ========================================================================= +// @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) +// ========================================================================= + +#include +#include +#include + +int main( int argc, char* argv[] ) +{ + typedef cpPluginsBase::RawFileReader TReader; + + if( argc != 2 ) + { + std::cerr << "Usage: " << argv[ 0 ] << " file" << std::endl; + return( 1 ); + + } // fi + + try + { + TReader::SharedPtr reader = TReader::New( ); + reader->SetInValue( "FileName", std::string( argv[ 1 ] ) ); + reader->Update( ); + + std::cout << *( reader->GetOutput( "Output" ) ) << std::endl; + } + catch( std::exception& err ) + { + std::cerr << "ERROR CAUGHT: " << err.what( ) << std::endl; + return( 1 ); + } // end try + return( 0 ); +} + +// eof - $RCSfile$ diff --git a/appli/examples/ReadRawFile_01.cxx b/appli/examples/ReadRawFile_01.cxx new file mode 100644 index 0000000..5156b8d --- /dev/null +++ b/appli/examples/ReadRawFile_01.cxx @@ -0,0 +1,40 @@ +// ========================================================================= +// @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) +// ========================================================================= + +#include +#include +#include +#include + +int main( int argc, char* argv[] ) +{ + typedef cpPlugins::Pipeline TPipeline; + typedef cpPlugins::Filter TFilter; + + if( argc != 2 ) + { + std::cerr << "Usage: " << argv[ 0 ] << " file" << std::endl; + return( 1 ); + } // end if + + try + { + TPipeline::SharedPtr pipeline = TPipeline::New( ); + TFilter* reader = + pipeline->CreateNode( "cpPluginsBase::RawFileReader" )-> + Cast< TFilter >( ); + reader->SetInValue( "FileName", std::string( argv[ 1 ] ) ); + reader->Update( ); + + std::cout << *( reader->GetOutput( "Output" ) ) << std::endl; + } + catch( std::exception& err ) + { + std::cerr << "ERROR CAUGHT: " << err.what( ) << std::endl; + return( 1 ); + } // end try + return( 0 ); +} + +// eof - $RCSfile$ diff --git a/appli/examples/ReadRawFile_02.cxx b/appli/examples/ReadRawFile_02.cxx new file mode 100644 index 0000000..1142478 --- /dev/null +++ b/appli/examples/ReadRawFile_02.cxx @@ -0,0 +1,36 @@ +// ========================================================================= +// @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) +// ========================================================================= + +#include +#include + +int main( int argc, char* argv[] ) +{ + typedef cpPlugins::Pipeline TPipeline; + typedef cpPlugins::Filter TFilter; + + if( argc != 2 ) + { + std::cerr << "Usage: " << argv[ 0 ] << " file" << std::endl; + return( 1 ); + } // end if + + try + { + TPipeline::SharedPtr pipeline = TPipeline::New( ); + pipeline->CreateNode( "cpPluginsBase::RawFileReader", "reader" ); + pipeline->SetInValue( "FileName@reader", std::string( argv[ 1 ] ) ); + pipeline->Update( ); + + std::cout << *( pipeline->GetOutput( "Output@reader" ) ) << std::endl; + } + catch( std::exception& err ) + { + std::cerr << "ERROR CAUGHT: " << err.what( ) << std::endl; + return( 1 ); + } // end try + return( 0 ); +} + +// eof - $RCSfile$ diff --git a/appli/examples/ReadWriteRawFile_00.cxx b/appli/examples/ReadWriteRawFile_00.cxx new file mode 100644 index 0000000..3832e3c --- /dev/null +++ b/appli/examples/ReadWriteRawFile_00.cxx @@ -0,0 +1,38 @@ +// ========================================================================= +// @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) +// ========================================================================= + +#include +#include +#include + +int main( int argc, char* argv[] ) +{ + typedef cpPluginsBase::RawFileReader TReader; + typedef cpPluginsBase::RawFileWriter TWriter; + + if( argc != 3 ) + { + std::cerr << "Usage: " << argv[ 0 ] << " input output" << std::endl; + return( 1 ); + } // end if + + try + { + TReader::SharedPtr reader = TReader::New( ); + reader->SetInValue( "FileName", std::string( argv[ 1 ] ) ); + + TWriter::SharedPtr writer = TWriter::New( ); + writer->SetInValue( "FileName", std::string( argv[ 2 ] ) ); + writer->SetInput( "Input", reader->GetOutput( "Output" ) ); + writer->Update( ); + } + catch( std::exception& err ) + { + std::cerr << "ERROR CAUGHT: " << err.what( ) << std::endl; + return( 1 ); + } // end try + return( 0 ); +} + +// eof - $RCSfile$ diff --git a/appli/examples/ReadWriteRawFile_01.cxx b/appli/examples/ReadWriteRawFile_01.cxx new file mode 100644 index 0000000..fd2d799 --- /dev/null +++ b/appli/examples/ReadWriteRawFile_01.cxx @@ -0,0 +1,45 @@ +// ========================================================================= +// @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) +// ========================================================================= + +#include +#include +#include + +int main( int argc, char* argv[] ) +{ + typedef cpPlugins::Pipeline TPipeline; + typedef cpPlugins::Filter TFilter; + + if( argc != 3 ) + { + std::cerr << "Usage: " << argv[ 0 ] << " input output" << std::endl; + return( 1 ); + } // end if + + try + { + + TPipeline::SharedPtr pipeline = TPipeline::New( ); + + TFilter* reader = + pipeline->CreateNode( "cpPluginsBase::RawFileReader" )-> + Cast< TFilter >( ); + reader->SetInValue( "FileName", std::string( argv[ 1 ] ) ); + + TFilter* writer = + pipeline->CreateNode( "cpPluginsBase::RawFileWriter" )-> + Cast< TFilter >( ); + writer->SetInValue( "FileName", std::string( argv[ 2 ] ) ); + writer->SetInput( "Input", reader->GetOutput( "Output" ) ); + writer->Update( ); + } + catch( std::exception& err ) + { + std::cerr << "ERROR CAUGHT: " << err.what( ) << std::endl; + return( 1 ); + } // end try + return( 0 ); +} + +// eof - $RCSfile$ diff --git a/appli/examples/ReadWriteRawFile_02.cxx b/appli/examples/ReadWriteRawFile_02.cxx new file mode 100644 index 0000000..8183d19 --- /dev/null +++ b/appli/examples/ReadWriteRawFile_02.cxx @@ -0,0 +1,37 @@ +// ========================================================================= +// @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) +// ========================================================================= + +#include +#include + +int main( int argc, char* argv[] ) +{ + if( argc != 3 ) + { + std::cerr << "Usage: " << argv[ 0 ] << " input output" << std::endl; + return( 1 ); + } // end if + + try + { + typedef cpPlugins::Pipeline TPipeline; + + TPipeline::SharedPtr pipeline = TPipeline::New( ); + pipeline->ExecutionDebugOn( ); + pipeline->CreateNode( "cpPluginsBase::RawFileReader", "reader" ); + pipeline->CreateNode( "cpPluginsBase::RawFileWriter", "writer" ); + pipeline->SetInValue( "FileName@reader", std::string( argv[ 1 ] ) ); + pipeline->SetInValue( "FileName@writer", std::string( argv[ 2 ] ) ); + pipeline->Connect( "Output@reader", "Input@writer" ); + pipeline->Update( ); + } + catch( std::exception& err ) + { + std::cerr << "ERROR CAUGHT: " << err.what( ) << std::endl; + return( 1 ); + } // end try + return( 0 ); +} + +// eof - $RCSfile$ diff --git a/bash/CMakeLists.txt b/bash/CMakeLists.txt deleted file mode 100644 index 36c5075..0000000 --- a/bash/CMakeLists.txt +++ /dev/null @@ -1,25 +0,0 @@ -CONFIGURE_FILE( - ${CMAKE_CURRENT_SOURCE_DIR}/Config.h.in - ${CMAKE_CURRENT_BINARY_DIR}/Config.h - @ONLY - ) -INCLUDE_DIRECTORIES( - ${PROJECT_SOURCE_DIR} - ${PROJECT_BINARY_DIR} - ) -SET( - _progs - CreateDemanglers - CreateInstances - CreateRealConfig - HostCreator - ) -FOREACH(_p ${_progs}) - ADD_EXECUTABLE(cpPlugins_bash_${_p} ${_p}) - SET( - cpPlugins_bash_${_p}_APP cpPlugins_bash_${_p} - CACHE INTERNAL "bash program cpPlugins_bash_${_p}" - ) -ENDFOREACH(_p) - -## eof - $RCSfile$ diff --git a/bash/Config.h.in b/bash/Config.h.in deleted file mode 100644 index 1d53531..0000000 --- a/bash/Config.h.in +++ /dev/null @@ -1,274 +0,0 @@ -#ifndef __cpPlugins__bash__Config__h__ -#define __cpPlugins__bash__Config__h__ - -// ------------------------------------------------------------------------- -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// ------------------------------------------------------------------------- -#define cpPlugins_PROCESS_DIMS "@cpPlugins_PROCESS_DIMS@" -#define cpPlugins_VISUAL_DIMS "@cpPlugins_VISUAL_DIMS@" -#define cpPlugins_ALL_CONFIGS "@cpPlugins_ALL_CONFIGS@" -#define cpPlugins_NUMBER_OF_FILES @cpPlugins_NUMBER_OF_FILES@ - -// ------------------------------------------------------------------------- -#define cpPlugins_bash_OS_@CMAKE_SYSTEM_NAME@ -#ifdef cpPlugins_bash_OS_Windows -# define cpPlugins_bash_STRTOK( A, B, N ) strtok_s( A, B, N ) -# define cpPlugins_bash_SPRINTF( B, S, O ) sprintf_s( B, S, "%s", O ); -#else // cpPlugins_bash_OS_Windows -# define cpPlugins_bash_STRTOK( A, B, N ) std::strtok( A, B ) -# define cpPlugins_bash_SPRINTF( B, S, O ) std::sprintf( B, "%s", O ); -#endif // cpPlugins_bash_OS_Windows - -// ------------------------------------------------------------------------- -typedef std::deque< std::string > TStrings; -typedef std::map< std::string, TStrings > TCommands; - -/** - */ -namespace cpPlugins_bash -{ - // ----------------------------------------------------------------------- - template< class _TTokens > - inline void Tokenize( - _TTokens& tokens, const std::string& str, const std::string& delims - ) - { - tokens.clear( ); - if( str.size( ) > 0 ) - { - auto ssize = str.size( ); - char* buffer = new char[ ssize + 1 ]; - for( unsigned long i = 0; i < ssize; ++i ) - buffer[ i ] = str[ i ]; - buffer[ ssize ] = '\0'; - char* next; - char* it = cpPlugins_bash_STRTOK( buffer, delims.c_str( ), &next ); - while( it != NULL ) - { - tokens.push_back( std::string( it ) ); - it = cpPlugins_bash_STRTOK( NULL, delims.c_str( ), &next ); - - } // elihw - delete [] buffer; - - } // fi - } - - // ----------------------------------------------------------------------- - inline std::string Replace( - const std::string& str, const std::string& sub, const std::string& nsub - ) - { - std::string res = str; - size_t index; - while( ( index = res.find( sub ) ) != std::string::npos ) - res.replace( index, sub.size( ), nsub ); - return( res ); - } - - // ----------------------------------------------------------------------- - inline bool Read( std::string& buffer, const std::string& fname ) - { - buffer = ""; - std::ifstream file_stream( fname.c_str( ) ); - if( !file_stream ) - return( false ); - file_stream.seekg( 0, std::ios::end ); - buffer.reserve( ( unsigned int )( file_stream.tellg( ) ) ); - file_stream.seekg( 0, std::ios::beg ); - buffer.assign( - ( std::istreambuf_iterator< char >( file_stream ) ), - std::istreambuf_iterator< char >( ) - ); - file_stream.close( ); - return( true ); - } - - // ----------------------------------------------------------------------- - inline bool Write( const std::string& buffer, const std::string& fname ) - { - std::ofstream file_stream( fname.c_str( ), std::ofstream::binary ); - if( !file_stream ) - return( false ); - file_stream.write( buffer.c_str( ), buffer.size( ) ); - return( true ); - } - - // ----------------------------------------------------------------------- - inline void Parse( TCommands& commands, const TStrings& lines ) - { - for( auto l = lines.begin( ); l != lines.end( ); ++l ) - { - auto line = l->substr( l->find_first_not_of( " " ) ); - if( line != "" ) - { - if( line[ 0 ] != '*' ) - { - auto cmd = line.substr( 0, line.find( " " ) ); - auto args = line.substr( line.find( " " ) + 1 ); - commands[ cmd ].push_back( args ); - - } // fi - - } // fi - - } // rof - } - - // ----------------------------------------------------------------------- - inline void LoadDefinitions( TCommands& commands ) - { - // Dimensions - commands[ "define" ].push_back( - std::string( "pdims=" ) + - std::string( cpPlugins_PROCESS_DIMS ) - ); - commands[ "define" ].push_back( - std::string( "vdims=" ) + - std::string( cpPlugins_VISUAL_DIMS ) - ); - - // Base c++ types - commands[ "define" ].push_back( - std::string( "int_types=char;short;int;long" ) - ); - commands[ "define" ].push_back( - std::string( "uint_types=unsigned #int_types#" ) - ); - commands[ "define" ].push_back( - std::string( "sint_types=signed char" ) - ); - commands[ "define" ].push_back( - std::string( "real_types=float;double" ) - ); - commands[ "define" ].push_back( - std::string( - "scalar_types=#int_types#;#uint_types#;#real_types#" - ) - ); - } - - // ----------------------------------------------------------------------- - inline void ExpandDefinitions( - TCommands& definitions, const TCommands& commands - ) - { - definitions.clear( ); - auto defs = commands.find( "define" ); - if( defs == commands.end( ) ) - return; - - std::map< std::string, std::string > values; - for( auto dIt = defs->second.begin( ); dIt != defs->second.end( ); ++dIt ) - { - TStrings toks; - cpPlugins_bash::Tokenize( toks, *dIt, "=" ); - if( toks.size( ) == 2 ) - { - auto name = toks[ 0 ].substr( toks[ 0 ].find_first_not_of( " " ) ); - auto val = toks[ 1 ].substr( toks[ 1 ].find_first_not_of( " " ) ); - values[ name ] = val; - - } // fi - - } // rof - for( auto vIt = values.begin( ); vIt != values.end( ); ++vIt ) - { - TStrings toks; - cpPlugins_bash::Tokenize( toks, vIt->second, ";" ); - for( auto tIt = toks.begin( ); tIt != toks.end( ); ++tIt ) - definitions[ vIt->first ].push_back( *tIt ); - - } // rof - for( auto dIt = definitions.begin( ); dIt != definitions.end( ); ++dIt ) - { - auto name = std::string( "#" ) + dIt->first + std::string( "#" ); - for( auto eIt = definitions.begin( ); eIt != definitions.end( ); ++eIt ) - { - if( eIt != dIt ) - { - auto vIt = eIt->second.begin( ); - while( vIt != eIt->second.end( ) ) - { - if( vIt->find( name ) != std::string::npos ) - { - for( - auto wIt = dIt->second.begin( ); - wIt != dIt->second.end( ); - ++wIt - ) - eIt->second.push_back( - cpPlugins_bash::Replace( *vIt, name, *wIt ) - ); - vIt = eIt->second.erase( vIt ); - } - else - ++vIt; - - } // elihw - - } // fi - - } // rof - - } // rof - } - - // ----------------------------------------------------------------------- - inline void Expand( - TStrings& tfiles, - const TCommands& definitions, - const TCommands& commands, - const std::string& cmd - ) - { - tfiles.clear( ); - auto tIt = commands.find( cmd ); - if( tIt == commands.end( ) ) - return; - - for( auto fIt = tIt->second.begin( ); fIt != tIt->second.end( ); ++fIt ) - { - std::queue< std::string > q; - q.push( *fIt ); - while( q.size( ) > 0 ) - { - auto value = q.front( ); - q.pop( ); - auto spos = value.find( "#" ); - if( spos != std::string::npos ) - { - auto name = value.substr( spos + 1 ); - auto epos = name.find( "#" ); - name = name.substr( 0, epos ); - auto dIt = definitions.find( name ); - if( dIt != definitions.end( ) ) - { - name = std::string( "#" ) + name + std::string( "#" ); - for( auto vIt = dIt->second.begin( ); vIt != dIt->second.end( ); ++vIt ) - q.push( cpPlugins_bash::Replace( value, name, *vIt ) ); - - } // fi - } - else - tfiles.push_back( value ); - - } // rof - - } // rof - } - -} // ecapseman - -#endif // __cpPlugins__bash__Config__h__ - -// eof - $RCSfile$ diff --git a/bash/CreateDemanglers.cxx b/bash/CreateDemanglers.cxx deleted file mode 100644 index a68117f..0000000 --- a/bash/CreateDemanglers.cxx +++ /dev/null @@ -1,121 +0,0 @@ -#include - -#define MAX_NUMBER_OF_INPUTS 9 - -// ------------------------------------------------------------------------- -int main( int argc, char* argv[] ) -{ - // Get inputs - if( argc < 4 ) - { - std::cerr - << "Usage: " << argv[ 0 ] - << " definitons_file object_name output_file" - << std::endl; - return( 1 ); - - } // fi - std::string definitions_filename = argv[ 1 ]; - std::string object_name = argv[ 2 ]; - std::string output_filename = argv[ 3 ]; - - // Read inputs - std::string definitions_buffer; - if( !( cpPlugins_bash::Read( definitions_buffer, definitions_filename ) ) ) - { - std::cerr - << argv[ 0 ] - << ": Error reading definitions file \"" << definitions_filename - << "\"" << std::endl; - return( 1 ); - - } // fi - - // Put it in a line-by-line structure - TStrings definitions_lines; - cpPlugins_bash::Tokenize( definitions_lines, definitions_buffer, "\n" ); - - // Parse input file - TCommands commands; - cpPlugins_bash::Parse( commands, definitions_lines ); - - // Load pre-compiled definitions - cpPlugins_bash::LoadDefinitions( commands ); - - // Expand definitions - TCommands definitions; - cpPlugins_bash::ExpandDefinitions( definitions, commands ); - - // Expand data - std::stringstream data; - data - << "#ifndef __cpPlugins__Demanglers__" << object_name << "__h__" << std::endl - << "#define __cpPlugins__Demanglers__" << object_name << "__h__" << std::endl - << std::endl; - - for( auto cIt = commands.begin( ); cIt != commands.end( ); ++cIt ) - { - if( cIt->first == "define" ) - continue; - - TStrings instances; - cpPlugins_bash::Expand( instances, definitions, commands, cIt->first ); - TStrings toks; - cpPlugins_bash::Tokenize( toks, cIt->first, "|" ); - for( unsigned int nIns = 1; nIns <= MAX_NUMBER_OF_INPUTS; ++nIns ) - { - if( toks.size( ) > 1 ) - { - data - << "#define cpPlugins_Demangle_" << object_name << "_" - << toks[ 0 ] << "_" << nIns << "( o, f"; - for( unsigned int i = 1; i < toks.size( ); ++i ) - data << ", " << toks[ i ]; - } - else - data - << "#define cpPlugins_Demangle_" << object_name << "_" - << toks[ 0 ] << "_" << nIns << "( o, f"; - - for( unsigned int i = 1; i < nIns; ++i ) - data << ", X" << i; - data << " ) \\"; - - data << std::endl; - std::string prefix = ""; - for( auto iIt = instances.begin( ); iIt != instances.end( ); ++iIt ) - { - data - << " " << prefix - << "if( dynamic_cast< " << *iIt << "* >( o ) != NULL ) \\" - << std::endl - << " this->f( dynamic_cast< " << *iIt << "* >( o )"; - - for( unsigned int i = 1; i < nIns; ++i ) - data << ", X" << i; - data - << " ); \\" - << std::endl; - prefix = "else "; - - } // rof - data << " " << prefix << std::endl << std::endl; - - } // rof - - } // rof - - data - << "#endif // __cpPlugins__Demanglers__" << object_name << "__h__" - << std::endl; - if( !( cpPlugins_bash::Write( data.str( ), output_filename ) ) ) - { - std::cerr << "Error writing file." << std::endl; - return( 1 ); - - } // fi - - return( 0 ); -} - -// eof - $RCSfile$ diff --git a/bash/CreateInstances.cxx b/bash/CreateInstances.cxx deleted file mode 100644 index a107c26..0000000 --- a/bash/CreateInstances.cxx +++ /dev/null @@ -1,168 +0,0 @@ -#include - -// ------------------------------------------------------------------------- -int main( int argc, char* argv[] ) -{ - // Get inputs - if( argc < 4 ) - { - std::cerr - << "Usage: " << argv[ 0 ] - << " definitons_file library_name output_prefix" - << std::endl; - return( 1 ); - - } // fi - std::string definitions_filename = argv[ 1 ]; - std::string library_name = argv[ 2 ]; - std::string output_prefix = argv[ 3 ]; - unsigned int number_of_sources = cpPlugins_NUMBER_OF_FILES; - - // Read inputs - std::string definitions_buffer; - if( !( cpPlugins_bash::Read( definitions_buffer, definitions_filename ) ) ) - { - std::cerr - << argv[ 0 ] - << ": Error reading definitions file \"" << definitions_filename - << "\"" << std::endl; - return( 1 ); - - } // fi - - // Put it in a line-by-line structure - TStrings definitions_lines; - cpPlugins_bash::Tokenize( definitions_lines, definitions_buffer, "\n" ); - - // Parse input file - TCommands commands; - cpPlugins_bash::Parse( commands, definitions_lines ); - - // Load pre-compiled definitions - cpPlugins_bash::LoadDefinitions( commands ); - - // Expand definitions - TCommands definitions; - cpPlugins_bash::ExpandDefinitions( definitions, commands ); - definitions[ "_export_" ].clear( ); - definitions[ "_export_" ].push_back( library_name + std::string( "_EXPORT" ) ); - - // Expand data - TStrings tfiles, cfiles, instances, minstances; - cpPlugins_bash::Expand( tfiles, definitions, commands, "tinclude" ); - cpPlugins_bash::Expand( cfiles, definitions, commands, "cinclude" ); - cpPlugins_bash::Expand( instances, definitions, commands, "instances" ); - cpPlugins_bash::Expand( minstances, definitions, commands, "minstances" ); - - // Build all instances - TStrings all_instances; - for( auto iIt = instances.begin( ); iIt != instances.end( ); ++iIt ) - { - std::stringstream str; - str << "template class " << library_name << "_EXPORT " << *iIt; - all_instances.push_back( str.str( ) ); - - } // rof - for( auto iIt = minstances.begin( ); iIt != minstances.end( ); ++iIt ) - { - std::stringstream str; - str << "template " << *iIt; - all_instances.push_back( str.str( ) ); - - } // rof - - // Write source code - unsigned int instances_per_file = - ( unsigned int )( - std::floor( double( all_instances.size( ) ) / double( number_of_sources ) ) - ); - if( instances_per_file == 0 ) - instances_per_file = 1; - std::vector< std::vector< std::string > > all_lines( 1 ); - for( unsigned int c_id = 0; c_id < all_instances.size( ); ++c_id ) - { - all_lines[ all_lines.size( ) - 1 ].push_back( all_instances[ c_id ] ); - if( c_id % instances_per_file == instances_per_file - 1 ) - all_lines.push_back( std::vector< std::string >( ) ); - - } // rof - - // Paranoiac code - while( all_lines.size( ) > number_of_sources ) - { - all_lines[ all_lines.size( ) - 2 ].insert( - all_lines[ all_lines.size( ) - 2 ].end( ), - all_lines[ all_lines.size( ) - 1 ].begin( ), - all_lines[ all_lines.size( ) - 1 ].end( ) - ); - all_lines.pop_back( ); - - } // elihw - while( all_lines.size( ) < number_of_sources ) - all_lines.push_back( std::vector< std::string >( ) ); - - // Real write - for( unsigned int f_id = 0; f_id < all_lines.size( ); ++f_id ) - { - std::stringstream source; - source - << "#include <" << library_name << "_Export.h>" - << std::endl; - auto hIt = commands.find( "header" ); - if( hIt != commands.end( ) ) - { - source << std::endl; - for( auto vIt = hIt->second.begin( ); vIt != hIt->second.end( ); ++vIt ) - source << *vIt << std::endl; - source << std::endl; - - } // fi - - if( tfiles.size( ) > 0 ) - { - for( auto tIt = tfiles.begin( ); tIt != tfiles.end( ); ++tIt ) - { - TStrings toks; - cpPlugins_bash::Tokenize( toks, *tIt, ":|" ); - if( toks.size( ) == 3 ) - { - source << "#include <" << toks[ 0 ] << "." << toks[ 1 ] << ">" << std::endl; - source << "#include <" << toks[ 0 ] << "." << toks[ 2 ] << ">" << std::endl; - - } // fi - - } // rof - source << std::endl; - - } // fi - - if( cfiles.size( ) > 0 ) - { - for( auto cIt = cfiles.begin( ); cIt != cfiles.end( ); ++cIt ) - source << "#include <" << *cIt << ">" << std::endl; - source << std::endl; - - } // fi - - for( - auto c_it = all_lines[ f_id ].begin( ); - c_it != all_lines[ f_id ].end( ); - ++c_it - ) - source << *c_it << ";" << std::endl; - source << std::endl << "// eof" << std::endl; - std::stringstream source_file; - source_file - << output_prefix << "_" << f_id << ".cxx"; - if( !( cpPlugins_bash::Write( source.str( ), source_file.str( ) ) ) ) - { - std::cerr << "Error writing source code." << std::endl; - return( 1 ); - - } // fi - - } // rof - return( 0 ); -} - -// eof - $RCSfile$ diff --git a/bash/CreateRealConfig.cxx b/bash/CreateRealConfig.cxx deleted file mode 100644 index e9737d5..0000000 --- a/bash/CreateRealConfig.cxx +++ /dev/null @@ -1,37 +0,0 @@ -#include - -// ------------------------------------------------------------------------- -int main( int argc, char* argv[] ) -{ - // Get inputs - if( argc < 2 ) - { - std::cerr << "Usage: " << argv[ 0 ] << " output_file" << std::endl; - return( 1 ); - - } // fi - std::string output_filename = argv[ 1 ]; - - std::stringstream data; - data - << "#ifndef __cpPlugins__RealConfig__h__" << std::endl - << "#define __cpPlugins__RealConfig__h__" << std::endl - << std::endl; - - TStrings tokens; - cpPlugins_bash::Tokenize( tokens, cpPlugins_ALL_CONFIGS, ";" ); - for( auto t = tokens.begin( ); t != tokens.end( ); ++t ) - data << "#define " << *t << std::endl; - - data << std::endl << "#endif // __cpPlugins__RealConfig__h__" << std::endl; - if( !( cpPlugins_bash::Write( data.str( ), output_filename ) ) ) - { - std::cerr << "Error writing file." << std::endl; - return( 1 ); - - } // fi - - return( 0 ); -} - -// eof - $RCSfile$ diff --git a/bash/HostCreator.cxx b/bash/HostCreator.cxx deleted file mode 100644 index 8e6f274..0000000 --- a/bash/HostCreator.cxx +++ /dev/null @@ -1,193 +0,0 @@ -#include -#include -#include -#include -#include -#include - -// ------------------------------------------------------------------------- -typedef std::pair< std::string, std::string > TPair; -typedef std::map< std::string, TPair > TInfo; - -// ------------------------------------------------------------------------- -bool is_valid_class( const std::string& str ) -{ - return( str.find( "cpPluginsObject" ) != std::string::npos ); -} - -// ------------------------------------------------------------------------- -void process_header( TInfo& info, const std::string& file_name ) -{ - std::string buffer; - if( !( cpPlugins_bash::Read( buffer, file_name ) ) ) - return; - - auto prev_pos = std::string::npos; - prev_pos = 0; - auto pos = buffer.find( "cpPluginsObject" ); - while( pos != std::string::npos ) - { - // Get class names - auto op = buffer.find( "(", pos ); - auto cl = buffer.find( ")", pos ); - std::vector< std::string > tokens; - cpPlugins_bash::Tokenize( - tokens, - buffer.substr( op + 1, cl - op - 2 ), - ",\n " - ); - - std::string namespace_name = ""; - auto preamble = buffer.substr( prev_pos, pos ); - auto napos = preamble.find( "namespace" ); - while( napos != std::string::npos ) - { - auto enapos = preamble.find( "{", napos + 1 ); - auto tmp = preamble.substr( napos, enapos - napos + 1 ); - std::vector< std::string > tokens2; - cpPlugins_bash::Tokenize( tokens2, tmp, " \n\t{" ); - namespace_name = tokens2.back( ); - napos = preamble.find( "namespace", napos + 1 ); - - } // elihw - - auto class_name = tokens[ 0 ]; - auto superclass_name = tokens[ 1 ]; - auto category_name = tokens[ 2 ]; - if( info.find( class_name ) == info.end( ) ) - info[ class_name ] = TPair( category_name, namespace_name ); - prev_pos = pos; - pos = buffer.find( "cpPluginsObject", pos + 1 ); - - } // elihw -} - -// ------------------------------------------------------------------------- -int main( int argc, char* argv[] ) -{ - if( argc < 4 ) - { - std::cerr - << "Usage: " << argv[ 0 ] - << " plugins_name output_file header_file_0.h header_file_0.h ..." - << std::endl; - return( 1 ); - - } // fi - std::string plugins_name = argv[ 1 ]; - std::string output_filename = argv[ 2 ]; - - // Parse all header files - TInfo info; - for( int i = 3; i < argc; ++i ) - process_header( info, argv[ i ] ); - if( info.size( ) == 0 ) - { - std::cerr << "ERROR: No valid input headers." << std::endl; - return( 1 ); - - } // fi - - // Prepare prefixes -#if defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) - std::string export_prefix = "__declspec(dllexport)"; -#else // defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) - std::string export_prefix = "__attribute__((visibility(\"default\")))"; -#endif // defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) - - // Output data - std::stringstream out; - - // Include section - out - << "#include " << std::endl - << "#include " << std::endl - << "#include " << std::endl - << "#include " << std::endl - << std::endl; - for( int i = 3; i < argc; ++i ) - out << "#include \"" << argv[ i ] << "\"" < " - << plugins_name << "_Data;" << std::endl - << std::endl - << "// -------------------------------------------------------------------------" << std::endl - << "extern \"C\" void __attribute__ ((constructor))" << std::endl - << plugins_name << "_Init( )" << std::endl - << "{" << std::endl - << "}" << std::endl - << std::endl - << "// -------------------------------------------------------------------------" << std::endl - << "extern \"C\" void __attribute__ ((destructor))" << std::endl - << plugins_name << "_Finish( )" << std::endl - << "{" << std::endl - << " // " << plugins_name << "_Data.clear( );" << std::endl - << "}" << std::endl - << std::endl - << "// -------------------------------------------------------------------------" << std::endl - << "extern \"C\" " << export_prefix << std::endl - << "void " << plugins_name << "_LoadContents( )" << std::endl - << "{" << std::endl - << " if( " << plugins_name << "_Data.size( ) == 0 )" << std::endl - << " {" << std::endl - << " std::string sep = \"@\";" << std::endl; - - // Classes - int id = 1; - for( auto iIt = info.begin( ); iIt != info.end( ); ++iIt, ++id ) - { - std::string class_name = iIt->second.second; - if( class_name != "" ) - class_name += std::string( "::" ); - class_name += iIt->first; - out - << " " << class_name << "::Pointer ptr" << id << " =" << std::endl - << " " << class_name << "::New( );" << std::endl - << " std::string id" << id << " = ptr" << id << "->GetClassName( )" - << " + sep + ptr" << id << "->GetClassCategory( );" << std::endl - << " " << plugins_name << "_Data[ id" << id << " ] = ptr" << id << ";" - << std::endl; - - } // rof - - // Remaining header - out - << std::endl << " } // fi" << std::endl << "}" << std::endl << std::endl - << "// -------------------------------------------------------------------------" << std::endl - << "extern \"C\" " << export_prefix << std::endl - << "void cpPlugins_Contents( std::vector< std::string >* c )" << std::endl - << "{" << std::endl - << " " << plugins_name << "_LoadContents( );" << std::endl - << " for( auto d : " << plugins_name << "_Data )" << std::endl - << " c->push_back( d.first );" << std::endl - << "}" << std::endl - << std::endl - << "// -------------------------------------------------------------------------" << std::endl - << "extern \"C\" " << export_prefix << std::endl - << "void cpPlugins_Creator( itk::LightObject::Pointer& ptr, const std::string& c, const std::string& f )" << std::endl - << "{" << std::endl - << " " << plugins_name << "_LoadContents( );" << std::endl - << " ptr = NULL;" << std::endl - << " std::string id = f + \"@\" + c;" << std::endl - << " auto fIt = " << plugins_name << "_Data.find( id );" << std::endl - << " if( fIt != " << plugins_name << "_Data.end( ) )" << std::endl - << " ptr = fIt->second->CreateAnother( );" << std::endl - << "}" << std::endl << std::endl - << "// eof - $Automatic generated file$" - << std::endl; - - // Real write - if( !( cpPlugins_bash::Write( out.str( ), output_filename ) ) ) - { - std::cerr << "ERROR: Could not write file." << std::endl; - return( 1 ); - - } // fi - return( 0 ); -} - -// eof - $RCSfile$ diff --git a/cmake/BaseConfig.cmake b/cmake/BaseConfig.cmake deleted file mode 100644 index d177604..0000000 --- a/cmake/BaseConfig.cmake +++ /dev/null @@ -1,51 +0,0 @@ -## ======================================================================= -## == Force c++11 language version == -## == NOTE: It seems that by default on Visual Studio Compiler supports == -## == c++11, so it only need to be tested on other OS. == -## ======================================================================= - -IF(NOT MSVC) - INCLUDE(CheckCXXCompilerFlag) - CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11) - IF(COMPILER_SUPPORTS_CXX11) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") - ELSE(COMPILER_SUPPORTS_CXX11) - CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X) - IF(COMPILER_SUPPORTS_CXX0X) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") - ELSE(COMPILER_SUPPORTS_CXX0X) - MESSAGE( - FATAL_ERROR - "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support." - ) - ENDIF(COMPILER_SUPPORTS_CXX0X) - ENDIF(COMPILER_SUPPORTS_CXX11) -ENDIF(NOT MSVC) - -## =================================================== -## == Prepare header generator to build shared libs == -## =================================================== - -INCLUDE(GenerateExportHeader) - -## ================================================== -## == Do not allow to build inside the source tree == -## ================================================== - -IF(PROJECT_BINARY_DIR STREQUAL ${PROJECT_SOURCE_DIR}) - MESSAGE(FATAL_ERROR "Building in the source tree is not allowed.") -ENDIF(PROJECT_BINARY_DIR STREQUAL ${PROJECT_SOURCE_DIR}) - -## ================================================= -## == Where to put targets (executables and libs) == -## ================================================= - -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 - ) - -## eof - $RCSfile$ diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index e942ae9..e3d07e5 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -1,11 +1,19 @@ -## ===================== -## == Configure files == -## ===================== +## ========================================================================= +## @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) +## ========================================================================= -CONFIGURE_FILE( - cpPluginsConfig.cmake.in - ${PROJECT_BINARY_DIR}/cpPluginsConfig.cmake - @ONLY +set( + _scripts + cpPlgDefinitions.cmake + cpPlgFunctions.cmake + cpPlg3rdParty.cmake + cpPlgInstallCommands.cmake ) +foreach(_s ${_scripts}) + install( + FILES "${_s}" + DESTINATION "lib/cmake/${PROJECT_NAME}" + ) +endforeach(_s) ## eof - $RCSfile$ diff --git a/cmake/Functions.cmake b/cmake/Functions.cmake deleted file mode 100644 index d755587..0000000 --- a/cmake/Functions.cmake +++ /dev/null @@ -1,328 +0,0 @@ -## ------------------------------------------------------------------------- -FUNCTION(NormPaths output_files) -SET(_out) -FOREACH(_f ${ARGN}) - SET(_d) - FILE(TO_CMAKE_PATH ${_f} _d) - LIST(APPEND _out ${_d}) -ENDFOREACH(_f) -SET(${output_files} "${_out}" PARENT_SCOPE) -ENDFUNCTION() - -## ------------------------------------------------------------------------- -FUNCTION(Wrap_Qt_CPP output_files) -SET(_out) -FOREACH(_f ${ARGN}) - IF(EXISTS ${_f}) - FILE(READ ${_f} _txt) - STRING(FIND "${_txt}" "Q_OBJECT" _pos) - IF(NOT ${_pos} EQUAL -1) - SET(_s) - QT4_WRAP_CPP(_s ${_f}) - SET(_out ${_out} ${_s}) - ENDIF(NOT ${_pos} EQUAL -1) - ENDIF(EXISTS ${_f}) -ENDFOREACH(_f) -SET(${output_files} "${_out}" PARENT_SCOPE) -ENDFUNCTION() - -## ------------------------------------------------------------------------- -FUNCTION(Wrap_Qt_UI output_files) -NormPaths(_source_dir ${PROJECT_SOURCE_DIR}) -NormPaths(_binary_dir ${PROJECT_BINARY_DIR}) -SET(_out) -FOREACH(_f ${ARGN}) - IF(EXISTS ${_f}) - GET_FILENAME_COMPONENT(_name ${_f} NAME_WE) - GET_FILENAME_COMPONENT(_dir ${_f} DIRECTORY) - SET(_base_dir ${_source_dir}) - STRING(FIND "${_dir}" "${_base_dir}" _pos) - IF(${_pos} EQUAL -1) - SET(_base_dir ${_binary_dir}) - STRING(FIND "${_dir}" "${_base_dir}" _pos) - ENDIF(${_pos} EQUAL -1) - IF(NOT ${_pos} EQUAL -1) - STRING(REPLACE "${_base_dir}/" "" _dir ${_dir}) - SET(_out_f ${_binary_dir}/${_dir}/ui_${_name}.h) - LIST(APPEND _out ${_out_f}) - ADD_CUSTOM_COMMAND( - OUTPUT ${_out_f} - COMMAND Qt4::uic - ARGS -o ${_out_f} ${_f} - MAIN_DEPENDENCY ${_f} VERBATIM - ) - ENDIF(NOT ${_pos} EQUAL -1) - ENDIF(EXISTS ${_f}) -ENDFOREACH(_f) -SET(${output_files} "${_out}" PARENT_SCOPE) -ENDFUNCTION() - -## ------------------------------------------------------------------------- -FUNCTION( - PrepareSourceFiles - lib_name - out_sources_list - out_headers_list - out_headers_paths - ) -SET(_config_extensions .c.in .cpp.in .cxx.in .h.in .hpp.in .hxx.in .ui.in) -SET(_sources_extensions .c .cpp .cxx) -SET(_headers_extensions .h .hpp .hxx) -SET(_qt_ui_extensions .ui) -SET(_demangler_extensions .d) -SET(_instances_extensions .i) - -## -- Configure inputs -SET(_all_files) -FOREACH(_file ${ARGN}) - GET_FILENAME_COMPONENT(_ext ${_file} EXT) - LIST(FIND _config_extensions ${_ext} _cfg) - IF(NOT ${_cfg} EQUAL -1) - STRING( - REPLACE - ${PROJECT_SOURCE_DIR} - ${PROJECT_BINARY_DIR} - _file_bin - ${_file} - ) - STRING(LENGTH ${_file_bin} _file_bin_len) - MATH(EXPR _file_bin_len "${_file_bin_len}-3") - STRING(SUBSTRING ${_file_bin} 0 ${_file_bin_len} _file_bin) - CONFIGURE_FILE(${_file} ${_file_bin} @ONLY) - LIST(APPEND _all_files ${_file_bin}) - ELSE(NOT ${_cfg} EQUAL -1) - LIST(APPEND _all_files ${_file}) - ENDIF(NOT ${_cfg} EQUAL -1) -ENDFOREACH(_file) - -## -- Separate files -SET(_srcs) -SET(_hdrs) -SET(_qts) -SET(_demanglers) -SET(_instances) -FOREACH(_file ${_all_files}) - GET_FILENAME_COMPONENT(_ext ${_file} EXT) - LIST(FIND _sources_extensions ${_ext} _src) - LIST(FIND _headers_extensions ${_ext} _hdr) - LIST(FIND _qt_ui_extensions ${_ext} _ui) - LIST(FIND _demangler_extensions ${_ext} _dem) - LIST(FIND _instances_extensions ${_ext} _ins) - IF(NOT ${_src} EQUAL -1) - LIST(APPEND _srcs ${_file}) - ENDIF(NOT ${_src} EQUAL -1) - IF(NOT ${_hdr} EQUAL -1) - LIST(APPEND _hdrs ${_file}) - ENDIF(NOT ${_hdr} EQUAL -1) - IF(NOT ${_ui} EQUAL -1) - LIST(APPEND _qts ${_file}) - ENDIF(NOT ${_ui} EQUAL -1) - IF(NOT ${_dem} EQUAL -1) - LIST(APPEND _demanglers ${_file}) - ENDIF(NOT ${_dem} EQUAL -1) - IF(NOT ${_ins} EQUAL -1) - LIST(APPEND _instances ${_file}) - ENDIF(NOT ${_ins} EQUAL -1) -ENDFOREACH(_file) - -# -- Prepare Qt4-based code -IF(Qt4_FOUND) - ## -- Guess what headers sould be qt-moc'ed - Wrap_Qt_CPP(_moc ${_hdrs}) - IF(_moc) - LIST(APPEND _srcs ${_moc}) - ENDIF(_moc) - - ## -- Guess what qt-ui's sould be qt-uic'ed - ## -- Wrap qt-ui headers: this is equivalent to QT4_WRAP_UI except to change - ## -- the output file - Wrap_Qt_UI(_qt_hdrs ${_qts}) - IF(_qt_hdrs) - LIST(APPEND _hdrs ${_qt_hdrs}) - ENDIF(_qt_hdrs) -ENDIF(Qt4_FOUND) - -## -- Create demanglers -FOREACH(_d ${_demanglers}) - STRING( - REPLACE - ${PROJECT_SOURCE_DIR} - ${PROJECT_BINARY_DIR} - _d_bin - ${_d} - ) - GET_FILENAME_COMPONENT(_d_path ${_d_bin} DIRECTORY) - GET_FILENAME_COMPONENT(_out_name ${_d_bin} NAME_WE) - SET(_d_out ${_d_path}/${_out_name}_Demanglers.h) - ADD_CUSTOM_COMMAND( - OUTPUT ${_d_out} - COMMAND ${CMAKE_COMMAND} -E make_directory ${_d_path} - COMMAND ${cpPlugins_bash_CreateDemanglers_APP} ${_d} ${_out_name} ${_d_out} - DEPENDS ${cpPlugins_bash_CreateDemanglers_APP} ${_d} - ) - LIST(APPEND _hdrs ${_d_out}) -ENDFOREACH(_d) - -## -- Create instances -FOREACH(_i ${_instances}) - STRING( - REPLACE - ${PROJECT_SOURCE_DIR} - ${PROJECT_BINARY_DIR} - _i_bin - ${_i} - ) - GET_FILENAME_COMPONENT(_i_path ${_i_bin} DIRECTORY) - GET_FILENAME_COMPONENT(_out_name ${_i} NAME_WE) - - ## -- Infere source code filenames - MATH(EXPR _last_range "${cpPlugins_NUMBER_OF_FILES}-1") - SET(_out_code) - FOREACH(_n RANGE 0 ${_last_range}) - LIST(APPEND _out_code ${_i_path}/${_out_name}_${_n}.cxx) - LIST(APPEND _srcs ${_i_path}/${_out_name}_${_n}.cxx) - ENDFOREACH(_n) - - ## -- Command to write source code - ADD_CUSTOM_COMMAND( - OUTPUT ${_out_code} - DEPENDS ${cpPlugins_bash_CreateInstances_APP} ${_i} - COMMAND ${CMAKE_COMMAND} -E make_directory ${_i_path} - COMMAND ${cpPlugins_bash_CreateInstances_APP} ${_i} ${lib_name} ${_i_path}/${_out_name} - ) -ENDFOREACH(_i) - -## -- Real compilation -SET(_hdrs_paths) -FOREACH(_hdr ${_hdrs}) - GET_FILENAME_COMPONENT(_path ${_hdr} DIRECTORY) - LIST(FIND _hdrs_paths ${_path} _path_idx) - IF(${_path_idx} EQUAL -1) - LIST(APPEND _hdrs_paths ${_path}) - ENDIF(${_path_idx} EQUAL -1) -ENDFOREACH(_hdr) - -SET(${out_sources_list} ${_srcs} PARENT_SCOPE) -SET(${out_headers_list} ${_hdrs} PARENT_SCOPE) -SET(${out_headers_paths} ${_hdrs_paths} PARENT_SCOPE) - -ENDFUNCTION() - -## ------------------------------------------------------------------------- -FUNCTION(cpPlugins_BuildLibrary lib_name lib_type) -# -- Detect all source files -SET(_all_files) -FOREACH(_c ${ARGN}) - GET_FILENAME_COMPONENT(_cname ${_c} ABSOLUTE) - SET(_files) - IF(IS_DIRECTORY ${_cname}) - FILE(GLOB_RECURSE _files "${_cname}/*") - ELSE(IS_DIRECTORY ${_cname}) - SET(_files ${_cname}) - ENDIF(IS_DIRECTORY ${_cname}) - LIST(APPEND _all_files ${_files}) -ENDFOREACH(_c ${ARGN}) - -## -- Prepare sources by types -PrepareSourceFiles(${lib_name} _srcs _hdrs _paths ${_all_files}) - -## -- Build library -IF(_srcs) - INCLUDE_DIRECTORIES( - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - ) - ADD_LIBRARY(${lib_name} ${lib_type} ${_srcs} ${_hdrs}) - GENERATE_EXPORT_HEADER( - ${lib_name} - BASE_NAME ${lib_name} - EXPORT_MACRO_NAME ${lib_name}_EXPORT - EXPORT_FILE_NAME ${lib_name}_Export.h - STATIC_DEFINE ${lib_name}_BUILT_AS_STATIC - ) -ENDIF(_srcs) - -ENDFUNCTION() - -## ------------------------------------------------------------------------- -FUNCTION(cpPlugins_BuildPluginsLibrary lib_name) -# -- Detect all source files -SET(_all_files) -FOREACH(_c ${ARGN}) - GET_FILENAME_COMPONENT(_cname ${_c} ABSOLUTE) - SET(_files) - IF(IS_DIRECTORY ${_cname}) - FILE(GLOB_RECURSE _files "${_cname}/*") - ELSE(IS_DIRECTORY ${_cname}) - SET(_files ${_cname}) - ENDIF(IS_DIRECTORY ${_cname}) - LIST(APPEND _all_files ${_files}) -ENDFOREACH(_c ${ARGN}) - -## -- Prepare sources by types -PrepareSourceFiles(${lib_name} _srcs _hdrs _paths ${_all_files}) - -## -- Check which headers need to be wrapped to build host code -SET(_hdrs_to_wrap) -FOREACH(_hdr ${_hdrs}) - IF(EXISTS ${_hdr}) - FILE(READ ${_hdr} _txt) - STRING(FIND "${_txt}" "cpPluginsObject" _res) - IF(NOT ${_res} EQUAL -1) - LIST(APPEND _hdrs_to_wrap ${_hdr}) - ENDIF(NOT ${_res} EQUAL -1) - ENDIF(EXISTS ${_hdr}) -ENDFOREACH(_hdr) - -## -- Wrap headers -IF(_hdrs_to_wrap) - SET(_host ${CMAKE_CURRENT_BINARY_DIR}/${lib_name}_host.cxx) - ADD_CUSTOM_COMMAND( - OUTPUT ${_host} - DEPENDS ${cpPlugins_bash_HostCreator_APP} ${_hdrs_to_wrap} - COMMAND ${cpPlugins_bash_HostCreator_APP} ${lib_name} ${_host} ${_hdrs_to_wrap} - ) - LIST(APPEND _all_files ${_host}) -ENDIF(_hdrs_to_wrap) - -cpPlugins_BuildLibrary(${lib_name} SHARED ${_all_files}) -ENDFUNCTION() - -## ------------------------------------------------------------------------- -FUNCTION(cpPlugins_BuildApplication app_name) -OPTION(BUILD_${app_name} "Build \"${app_name}\" application?" OFF) -IF(BUILD_${app_name}) - # -- Detect all source files - SET(_all_files) - FOREACH(_c ${ARGN}) - GET_FILENAME_COMPONENT(_cname ${_c} ABSOLUTE) - SET(_files) - IF(IS_DIRECTORY ${_cname}) - FILE(GLOB_RECURSE _files "${_cname}/*") - ELSE(IS_DIRECTORY ${_cname}) - SET(_files ${_cname}) - ENDIF(IS_DIRECTORY ${_cname}) - LIST(APPEND _all_files ${_files}) - ENDFOREACH(_c ${ARGN}) - - ## -- Prepare sources by types - PrepareSourceFiles(${app_name} _srcs _hdrs _paths ${_all_files}) - - ## -- Build library - IF(_srcs) - INCLUDE_DIRECTORIES( - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - ) - SET(_app_os_target) - IF(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") - SET(_app_os_target WIN32) - ELSEIF(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") - SET(_app_os_target MACOSX_BUNDLE) - ENDIF(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") - ADD_EXECUTABLE(${app_name} ${_app_os_target} ${_srcs} ${_hdrs}) - ENDIF(_srcs) -ENDIF(BUILD_${app_name}) -ENDFUNCTION() - -## eof - $RCSfile$ diff --git a/cmake/KitwareTools.cmake b/cmake/KitwareTools.cmake deleted file mode 100644 index b4493d2..0000000 --- a/cmake/KitwareTools.cmake +++ /dev/null @@ -1,19 +0,0 @@ -# ====================== -# == Find ITK and VTK == -# ====================== - -FIND_PACKAGE(ITK REQUIRED) -FIND_PACKAGE(VTK REQUIRED) - -INCLUDE(${ITK_USE_FILE}) -INCLUDE(${VTK_USE_FILE}) - -# =================================================== -# == Do not use itk-vtk glue --> problems ahead!!! == -# =================================================== - -IF(ITKVtkGlue_LOADED) - MESSAGE(FATAL_ERROR "ITKVtkGlue module is available. Please re-compile your ITK without it. It could lead to nasty compilation problems... Just waiting for Kitware to solve it.") -ENDIF(ITKVtkGlue_LOADED) - -## eof - $RCSfile$ diff --git a/cmake/Options.cmake b/cmake/Options.cmake deleted file mode 100644 index 6800c63..0000000 --- a/cmake/Options.cmake +++ /dev/null @@ -1,25 +0,0 @@ -## =============================== -## == Some configurable options == -## =============================== - -SET(cpPlugins_NUMBER_OF_FILES "10" CACHE STRING "Number of compiled files.") -SET(cpPlugins_PROCESS_DIMS "1;2;3" CACHE STRING "Accepted processing dimensions.") -SET(cpPlugins_VISUAL_DIMS "2;3" CACHE STRING "Accepted visual dimensions.") - -OPTION(BUILD_EXAMPLES "Build examples" OFF) -OPTION(BUILD_QT4_COMPONENTS "Build Qt4-based code" OFF) - -SET( - _all_configs - cpPlugins_PROCESS_DIMS - cpPlugins_VISUAL_DIMS - ) -SET(_real_configs) -FOREACH(_cfg ${_all_configs}) - FOREACH(_type ${${_cfg}}) - LIST(APPEND _real_configs "${_cfg}_${_type}") - ENDFOREACH(_type) -ENDFOREACH(_cfg) -SET(cpPlugins_ALL_CONFIGS "${_real_configs}" CACHE INTERNAL "All valid configurations." FORCE) - -## eof - $RCSfile$ diff --git a/cmake/QtTools.cmake b/cmake/QtTools.cmake deleted file mode 100644 index f4dd0cd..0000000 --- a/cmake/QtTools.cmake +++ /dev/null @@ -1,26 +0,0 @@ -## ================================================== -## == Find Qt4 and check if it was well configured == -## ================================================== - -IF(BUILD_QT4_COMPONENTS) - FIND_PACKAGE(Qt4 REQUIRED) - INCLUDE(${QT_USE_FILE}) - SET( - _modules - vtkGUISupportQt - ) - FOREACH(_m ${_modules}) - IF(NOT ${_m}_LOADED) - MESSAGE(FATAL_ERROR "${_m} module is required but not available.") - BREAK() - ENDIF(NOT ${_m}_LOADED) - ENDFOREACH(_m) - SET( - cpPlugins_Qt4_VTKWidget - QVTKWidget - CACHE STRING "Base Qt4-based vtkRenderWindow" - ) - MARK_AS_ADVANCED(CLEAR cpPlugins_Qt4_VTKWidget) -ENDIF(BUILD_QT4_COMPONENTS) - -## eof - $RCSfile$ diff --git a/cmake/cpPlg3rdParty.cmake b/cmake/cpPlg3rdParty.cmake new file mode 100644 index 0000000..316b5d0 --- /dev/null +++ b/cmake/cpPlg3rdParty.cmake @@ -0,0 +1,31 @@ +## ========================================================================= +## @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) +## ========================================================================= + +## == Find Boost +find_package(Boost REQUIRED COMPONENTS filesystem program_options) + +## == Find ITK +find_package(ITK CONFIG REQUIRED) +include(${ITK_USE_FILE}) + +## == Find VTK, only if linked against ITK +set(cpPlugins_USE_VTK 0) +if(ITKVtkGlue_LOADED) + find_package(VTK CONFIG REQUIRED) + include(${VTK_USE_FILE}) + set(cpPlugins_USE_VTK 1) +endif(ITKVtkGlue_LOADED) + +## == Find Qt5, only if linked against VTK +set(cpPlugins_USE_Qt5 0) +if(VTK_FOUND) + if(Qt5_DIR) + find_package(Qt5 CONFIG REQUIRED COMPONENTS Widgets) + set(CMAKE_INCLUDE_CURRENT_DIR ON) + set(CMAKE_AUTOMOC ON) + set(cpPlugins_USE_Qt5 1) + endif(Qt5_DIR) +endif(VTK_FOUND) + +## eof - $RCSfile$ diff --git a/cmake/cpPlgDefinitions.cmake b/cmake/cpPlgDefinitions.cmake new file mode 100644 index 0000000..1293f11 --- /dev/null +++ b/cmake/cpPlgDefinitions.cmake @@ -0,0 +1,37 @@ +## ========================================================================= +## @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) +## ========================================================================= + +## == If working on a MacOSX, activate the use of RPATH's +## == Furthermore: prepare the type of executables +set(APP_TYPE "" CACHE STRING "Executable linking." FORCE) +if(APPLE) + set(APP_TYPE "MACOSX_BUNDLE" CACHE STRING "Executable linking." FORCE) + set(CMAKE_MACOSX_RPATH true CACHE BOOL "Use RPATH's on MacOSX." FORCE) + mark_as_advanced(CMAKE_MACOSX_RPATH) +elseif(WIN32) + set(APP_TYPE "WIN32" CACHE STRING "Executable linking." FORCE) +endif(APPLE) +mark_as_advanced(APP_TYPE) + +## == Force c++17 +set(CMAKE_CXX_STANDARD 17) + +## == Prepare header generator to build shared libs +include(GenerateExportHeader) + +## == Do not allow to build inside the source tree +if(PROJECT_BINARY_DIR STREQUAL ${PROJECT_SOURCE_DIR}) + message(FATAL_ERROR "Building in the source tree is not allowed.") +endif(PROJECT_BINARY_DIR STREQUAL ${PROJECT_SOURCE_DIR}) + +## == Where to put targets (executables and libs) +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 + ) + +## eof - $RCSfile$ diff --git a/cmake/cpPlgFunctions.cmake b/cmake/cpPlgFunctions.cmake new file mode 100644 index 0000000..e0ff9f8 --- /dev/null +++ b/cmake/cpPlgFunctions.cmake @@ -0,0 +1,414 @@ +## ========================================================================= +## @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) +## ========================================================================= + +## ------------------------------------------------------------------------- +function(cpPlugins_PrepareSources + inputs recurrent includes links src hdr dirs plg def + ) + +## -- Process targets include dirs +set(_dirs) +if(links) + foreach(_l ${links}) + if(TARGET ${_l}) + get_target_property( + _incl + ${_l} + INTERFACE_INCLUDE_DIRECTORIES + ) + if(_incl) + foreach(_d ${_incl}) + list(APPEND _dirs ${_d}) + endforeach(_d) + endif(_incl) + endif(TARGET ${_l}) + endforeach(_l) +endif(links) + +## -- Start by configuring _dflags for cpPlugins_MOC +set(_dflags) +get_property( + _global_dirs + DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + PROPERTY INCLUDE_DIRECTORIES + ) +foreach(_i ${_global_dirs}) + set(_dflags ${_dflags} "-I${_i}") +endforeach() +foreach(_i ${includes}) + set(_dflags ${_dflags} "-I${_i}") +endforeach(_i) + +## -- Process all inputs +set(_files) +foreach(_s ${inputs}) + ## -- Canonicalize path + get_filename_component(_p "${_s}" ABSOLUTE) + + ## -- Check type of input + if(IS_DIRECTORY ${_p}) + list(APPEND _dirs ${_p}) + set(_dflags ${_dflags} "-I${_p}") + if(${recurrent}) + file(GLOB_RECURSE _f "${_p}/*") + else(${recurrent}) + file(GLOB _f "${_p}/*") + endif(${recurrent}) + foreach(_x ${_f}) + if(NOT IS_DIRECTORY ${_x}) + list(APPEND _files ${_x}) + endif(NOT IS_DIRECTORY ${_x}) + endforeach(_x) + else(IS_DIRECTORY ${_p}) + list(APPEND _files ${_p}) + endif(IS_DIRECTORY ${_p}) +endforeach(_s) + +## -- Process sources by extension +set(_def) +set(_cpp) +set(_hpp) +set(_qui) +set(_plg) + +foreach(_f ${_files}) + ## -- Separate filename from extension + string(REGEX REPLACE "\\.[^.]*$" "" _name ${_f}) + string(REPLACE ${_name} "" _ext ${_f}) + set(_out_name ${_name}) + set(_out_ext ${_ext}) + + if(_out_ext) + ## -- Process .in files + string(COMPARE EQUAL "${_ext}" ".in" _in_cmp) + if(_in_cmp) + string(REPLACE ${PROJECT_SOURCE_DIR} ${PROJECT_BINARY_DIR} _out ${_name}) + configure_file(${_f} ${_out} @ONLY) + string(REGEX REPLACE "\\.[^.]*$" "" _out_name ${_out}) + string(REPLACE ${_out_name} "" _out_ext ${_out}) + get_filename_component(_dir ${_out} DIRECTORY) + list(APPEND _dirs ${_dir}) + endif(_in_cmp) + + ## -- Process .d files + string(COMPARE EQUAL "${_ext}" ".d" _d_cmp) + if(_d_cmp) + string(REPLACE ${PROJECT_SOURCE_DIR} ${PROJECT_BINARY_DIR} _out ${_name}) + string(REGEX REPLACE "\\.[^.]*$" "" _out_name ${_out}) + string(REPLACE ${_out_name} "" _out_ext ${_out}) + get_filename_component(_dir ${_out} DIRECTORY) + list(APPEND _dirs ${_dir}) + add_custom_command( + OUTPUT ${_out} + COMMAND ${CMAKE_COMMAND} -E make_directory ${_dir} + COMMAND cpPlugins_MOC -i ${_f} -o ${_out} ${_dflags} + MAIN_DEPENDENCY ${_f} + DEPENDS cpPlugins_MOC + VERBATIM + ) + string(SUBSTRING ${_out_ext} 0 2 _ext_cmp) + endif(_d_cmp) + + ## -- Process .plg files + string(COMPARE EQUAL "${_ext}" ".plg" _plg_cmp) + if(_plg_cmp) + string(REPLACE ${PROJECT_SOURCE_DIR} ${PROJECT_BINARY_DIR} _out ${_name}) + string(REGEX REPLACE "\\.[^.]*$" "" _out_name ${_out}) + string(REPLACE ${_out_name} "" _out_ext ${_out}) + set(_out "${_out}.cxx") + get_filename_component(_dir ${_out} DIRECTORY) + add_custom_command( + OUTPUT ${_out} + COMMAND ${CMAKE_COMMAND} -E make_directory ${_dir} + COMMAND cpPlugins_HostCreator -i ${_f} -o ${_out} + MAIN_DEPENDENCY ${_f} + DEPENDS cpPlugins_HostCreator + VERBATIM + ) + set(_out_ext ".cxx") + list(APPEND _plg ${_f}) + endif(_plg_cmp) + + ## -- Get real extension + string(SUBSTRING ${_out_ext} 0 2 _ext_cmp) + + ## -- Process .e files + string(COMPARE EQUAL "${_ext_cmp}" ".e" _e_cmp) + if(_e_cmp) + list(APPEND _def ${_out_name}${_out_ext}) + endif(_e_cmp) + + ## -- Process .c?? files + string(COMPARE EQUAL "${_ext_cmp}" ".c" _c_cmp) + if(_c_cmp) + list(APPEND _cpp ${_out_name}${_out_ext}) + endif(_c_cmp) + + ## -- Process .h?? files + string(COMPARE EQUAL "${_ext_cmp}" ".h" _h_cmp) + if(_h_cmp) + list(APPEND _hpp ${_out_name}${_out_ext}) + endif(_h_cmp) + + ## -- Process .ui files + string(COMPARE EQUAL "${_out_ext}" ".ui" _u_cmp) + if(_u_cmp) + list(APPEND _qui ${_out_name}${_out_ext}) + endif(_u_cmp) + endif(_out_ext) +endforeach(_f) + +## -- Process Qt ui files +list(LENGTH _qui _qui_len) +if(${_qui_len} GREATER 0) + qt5_wrap_ui(_qui_hpp ${_qui}) +endif(${_qui_len} GREATER 0) + +## -- Build output lists +if(_dirs) + list(REMOVE_DUPLICATES _dirs) +endif(_dirs) +set(${dirs} "${_dirs}" PARENT_SCOPE) +set(${src} "${_cpp}" PARENT_SCOPE) +set(${hdr} "${_hpp};${_qui_hpp}" PARENT_SCOPE) +set(${plg} "${_plg}" PARENT_SCOPE) +set(${def} "${_def}" PARENT_SCOPE) + +endfunction() + +## ------------------------------------------------------------------------- +function(cpPlugins_BuildLibrary lib typ) +set(options RECURRENT INSTALL_ALL INSTALL_BIN INSTALL_DEV) +set(multiValueArgs SOURCES VERSION LINKS INCLUDES) +cmake_parse_arguments( + cpPlugins_BuildLibrary + "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} + ) +string(TOLOWER ${lib} _lower_lib) + +## -- Some useful values +string(REPLACE ${PROJECT_SOURCE_DIR} "" _current_src_dir ${CMAKE_CURRENT_SOURCE_DIR}) +string(REPLACE ${PROJECT_SOURCE_DIR} "" _current_bin_dir ${CMAKE_CURRENT_BINARY_DIR}) + +## -- Process sources +cpPlugins_PrepareSources( + "${cpPlugins_BuildLibrary_SOURCES}" + "${cpPlugins_BuildLibrary_RECURRENT}" + "${cpPlugins_BuildLibrary_INCLUDES}" + "${cpPlugins_BuildLibrary_LINKS}" + _src _hdr _dirs _plg _def + ) + +## -- Configure installation directory +include_directories( + ${cpPlugins_BuildLibrary_INCLUDES} + ${_dirs} + ) + +## -- Installation rules +if(cpPlugins_BuildLibrary_INSTALL_ALL) + set(cpPlugins_BuildLibrary_INSTALL_BIN ${cpPlugins_BuildLibrary_INSTALL_ALL}) + set(cpPlugins_BuildLibrary_INSTALL_DEV ${cpPlugins_BuildLibrary_INSTALL_ALL}) +endif(cpPlugins_BuildLibrary_INSTALL_ALL) + +if(_src) + ## -- Process declared plugins + if(_plg) + set(_c ${PROJECT_BINARY_DIR}/${lib}.plg.cmake) + file(WRITE ${_c} "set(_classes)\n") + file(APPEND ${_c} "foreach(_p \${_plg})\n") + file(APPEND ${_c} " file(STRINGS \${_p} _c REGEX \"^\\\\s*@.*$\")\n") + file(APPEND ${_c} " foreach(_l \${_c})\n") + file(APPEND ${_c} " string(REPLACE \" \" \";\" _m \${_l})\n") + file(APPEND ${_c} " list(GET _m 0 _n)\n") + file(APPEND ${_c} " string(SUBSTRING \${_n} 1 -1 _d)\n") + file(APPEND ${_c} " set(_classes \"\${_classes}\\n\${_d}\")\n") + file(APPEND ${_c} " endforeach(_l)\n") + file(APPEND ${_c} "endforeach(_p)\n") + file(APPEND ${_c} "file(WRITE \${_out} \"\${_classes}\")\n") + add_custom_target( + ${lib}.plg ALL + COMMAND + ${CMAKE_COMMAND} + -D_out:STRING="${lib}.plg" + -D_plg::STRING="${_plg}" + -P ${_c} + WORKING_DIRECTORY ${PROJECT_BINARY_DIR} + DEPENDS "${_plg}" + SOURCES "${_plg}" + COMMENT "Building \"${lib}\" plugins interface" + ) + add_dependencies(${lib}.plg ${lib}) + if(cpPlugins_BuildLibrary_INSTALL_BIN) + install(FILES ${PROJECT_BINARY_DIR}/${lib}.plg DESTINATION "lib") + endif(cpPlugins_BuildLibrary_INSTALL_BIN) + endif(_plg) + + ## -- Real build + add_library(${lib} ${typ} ${_src} ${_hdr}) + generate_export_header( + ${lib} + EXPORT_FILE_NAME ${lib}_Export.h + ) + list(APPEND _hdr "${CMAKE_CURRENT_BINARY_DIR}/${lib}_Export.h") + + ## -- Put version strings + if(cpPlugins_BuildLibrary_VERSION) + list(GET cpPlugins_BuildLibrary_VERSION 0 _a) + list(GET cpPlugins_BuildLibrary_VERSION 1 _b) + list(GET cpPlugins_BuildLibrary_VERSION 2 _c) + set_property(TARGET ${lib} PROPERTY VERSION "${_a}.${_b}.${_c}") + set_property(TARGET ${lib} PROPERTY SOVERSION ${_a}) + set_property(TARGET ${lib} PROPERTY INTERFACE_${lib}_MAJOR_VERSION ${_a}) + set_property( + TARGET ${lib} APPEND PROPERTY COMPATIBLE_INTERFACE_STRING ${_a} + ) + endif(cpPlugins_BuildLibrary_VERSION) + + ## -- Link library + if(cpPlugins_BuildLibrary_LINKS) + target_link_libraries(${lib} PUBLIC ${cpPlugins_BuildLibrary_LINKS}) + endif(cpPlugins_BuildLibrary_LINKS) +endif(_src) + +## -- Installation rules: library +if(_src) + if(cpPlugins_BuildLibrary_INSTALL_BIN) + install( + TARGETS ${lib} + EXPORT "${targets_export_name}" + LIBRARY DESTINATION "lib" + ARCHIVE DESTINATION "lib" + RUNTIME DESTINATION "bin" + INCLUDES DESTINATION "${include_install_dir}" + ) + endif(cpPlugins_BuildLibrary_INSTALL_BIN) +endif(_src) + +## -- Installation rules: source files + +if(cpPlugins_BuildLibrary_INSTALL_DEV) + set(_install_hdr ${_hdr}) + if(_def) + list(APPEND _install_hdr ${_def}) + endif(_def) + set(_install_dirs) + + foreach(_h ${_install_hdr}) + string(REPLACE ${PROJECT_SOURCE_DIR} "" _h_name ${_h}) + string(COMPARE EQUAL "${_h_name}" "${_h}" _h_cmp) + if(_h_cmp) + string(REPLACE ${PROJECT_BINARY_DIR} "" _h_name ${_h}) + endif(_h_cmp) + string(REPLACE ${_current_bin_dir} "" _h_name ${_h_name}) + string(COMPARE EQUAL "${_h_name}" "${_h_name}" _h_cmp) + if(_h_cmp) + string(REPLACE ${_current_src_dir} "" _h_name ${_h_name}) + endif(_h_cmp) + get_filename_component(_h_dir ${_h_name} DIRECTORY) + string(SUBSTRING ${_h_dir} 0 1 _h_dir_first) + string(COMPARE EQUAL "${_h_dir_first}" "/" _h_cmp) + if(_h_cmp) + string(SUBSTRING ${_h_dir} 1 -1 _h_dir) + endif(_h_cmp) + install( + FILES "${_h}" + DESTINATION "include/${_h_dir}" + ) + endforeach(_h) +endif(cpPlugins_BuildLibrary_INSTALL_DEV) + +endfunction() + +## ------------------------------------------------------------------------- +function(cpPlugins_BuildExecutable app) +set(options RECURRENT INSTALL) +set(oneValueArgs) +set(multiValueArgs SOURCES LINKS INCLUDES) +cmake_parse_arguments( + cpPlugins_BuildExecutable + "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} + ) + +cpPlugins_PrepareSources( + "${cpPlugins_BuildExecutable_SOURCES}" + "${cpPlugins_BuildExecutable_RECURRENT}" + "${cpPlugins_BuildExecutable_INCLUDES}" + "${cpPlugins_BuildExecutable_LINKS}" + _src _hdr _dirs _plg _def + ) + +if(_src) + ## -- Real build + include_directories( + ${cpPlugins_BuildExecutable_INCLUDES} + ${_dirs} + ) + add_executable(${app} ${_src} ${_hdr}) + + ## -- Link library + if(cpPlugins_BuildExecutable_LINKS) + target_link_libraries(${app} PUBLIC ${cpPlugins_BuildExecutable_LINKS}) + endif(cpPlugins_BuildExecutable_LINKS) + + ## -- Installation rules + if(cpPlugins_BuildExecutable_INSTALL) + install( + TARGETS ${app} + EXPORT "${targets_export_name}" + LIBRARY DESTINATION "lib" + ARCHIVE DESTINATION "lib" + RUNTIME DESTINATION "bin" + INCLUDES DESTINATION "${include_install_dir}" + ) + endif(cpPlugins_BuildExecutable_INSTALL) +endif(_src) +endfunction() + +## ------------------------------------------------------------------------- +function(cpPlugins_BuildApplication app) +set(options RECURRENT INSTALL) +set(oneValueArgs) +set(multiValueArgs SOURCES LINKS INCLUDES) +cmake_parse_arguments( + cpPlugins_BuildApplication + "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} + ) + +cpPlugins_PrepareSources( + "${cpPlugins_BuildApplication_SOURCES}" + "${cpPlugins_BuildApplication_RECURRENT}" + "${cpPlugins_BuildApplication_INCLUDES}" + "${cpPlugins_BuildApplication_LINKS}" + _src _hdr _dirs _plg _def + ) + +if(_src) + ## -- Real build + include_directories( + ${cpPlugins_BuildApplication_INCLUDES} + ${_dirs} + ) + add_executable(${app} ${_src} ${_hdr}) + + ## -- Link library + if(cpPlugins_BuildApplication_LINKS) + target_link_libraries(${app} PUBLIC ${cpPlugins_BuildApplication_LINKS}) + endif(cpPlugins_BuildApplication_LINKS) + + ## -- Installation rules + if(cpPlugins_BuildApplication_INSTALL) + install( + TARGETS ${app} + EXPORT "${targets_export_name}" + LIBRARY DESTINATION "lib" + ARCHIVE DESTINATION "lib" + RUNTIME DESTINATION "bin" + INCLUDES DESTINATION "${include_install_dir}" + ) + endif(cpPlugins_BuildApplication_INSTALL) +endif(_src) +endfunction() + +## eof - $RCSfile$ diff --git a/cmake/cpPlgInstallCommands.cmake b/cmake/cpPlgInstallCommands.cmake new file mode 100644 index 0000000..6c12393 --- /dev/null +++ b/cmake/cpPlgInstallCommands.cmake @@ -0,0 +1,47 @@ +## ========================================================================= +## @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) +## ========================================================================= + +## == Installation values +set(config_install_dir "lib/cmake/${PROJECT_NAME}") +set(include_install_dir "include") +set(generated_dir "${PROJECT_BINARY_DIR}/generated") +set(version_config "${generated_dir}/${PROJECT_NAME}ConfigVersion.cmake") +set(project_config "${generated_dir}/${PROJECT_NAME}Config.cmake") +set(targets_export_name "${PROJECT_NAME}Targets") +set(namespace "${PROJECT_NAME}::") + +## == Global installation rules +include(CMakePackageConfigHelpers) +write_basic_package_version_file( + "${version_config}" COMPATIBILITY SameMajorVersion + ) +configure_package_config_file( + "cmake/${PROJECT_NAME}Config.cmake.in" + "${project_config}" + INSTALL_DESTINATION "${config_install_dir}" + ) +install( + FILES "${project_config}" + DESTINATION "${config_install_dir}" + ) +if(${PROJECT_NAME}_BUILD) + install( + EXPORT "${targets_export_name}" + NAMESPACE "${namespace}" + DESTINATION "${config_install_dir}" + ) +endif(${PROJECT_NAME}_BUILD) + +## == Uninstall target +configure_file( + "${PROJECT_SOURCE_DIR}/cmake/cpPlgUninstall.cmake.in" + "${PROJECT_BINARY_DIR}/cmake/cpPlgUninstall.cmake" + IMMEDIATE @ONLY + ) +add_custom_target( + uninstall + COMMAND ${CMAKE_COMMAND} -P ${PROJECT_BINARY_DIR}/cmake/cpPlgUninstall.cmake + ) + +## eof - $RCSfile$ diff --git a/cmake/cpPlgUninstall.cmake.in b/cmake/cpPlgUninstall.cmake.in new file mode 100644 index 0000000..34c9330 --- /dev/null +++ b/cmake/cpPlgUninstall.cmake.in @@ -0,0 +1,27 @@ +## ========================================================================= +## @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) +## ========================================================================= + +if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") + message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") +endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") + +file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) +string(REGEX REPLACE "\n" ";" files "${files}") +foreach(file ${files}) + message(STATUS "Uninstalling $ENV{DESTDIR}${file}") + if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") + exec_program( + "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" + OUTPUT_VARIABLE rm_out + RETURN_VALUE rm_retval + ) + if(NOT "${rm_retval}" STREQUAL 0) + message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}") + endif(NOT "${rm_retval}" STREQUAL 0) + else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") + message(STATUS "File $ENV{DESTDIR}${file} does not exist.") + endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") +endforeach(file) + +## eof - $RCSfile$ diff --git a/cmake/cpPluginsConfig.cmake.in b/cmake/cpPluginsConfig.cmake.in index 0a65b42..ecbdaa4 100644 --- a/cmake/cpPluginsConfig.cmake.in +++ b/cmake/cpPluginsConfig.cmake.in @@ -1,120 +1,33 @@ -## ================================ -## == Find cpPlugins-cmake tools == -## ================================ - -SET(ITK_DIR "@ITK_DIR@") -SET(VTK_DIR "@VTK_DIR@") -IF("@Qt4_FOUND@" STREQUAL "TRUE") - SET(BUILD_QT4_COMPONENTS ON) - SET(QT_QMAKE_EXECUTABLE "@QT_QMAKE_EXECUTABLE@") -ENDIF("@Qt4_FOUND@" STREQUAL "TRUE") - -## ==================== -## == Find libraries == -## ==================== - -SET( - cpPlugins_AllInstances - cpInstances_BaseObjects - cpInstances_Images - cpInstances_Geometries - cpInstances_Extensions - CACHE STRING "All instances from templated code" - ) -MARK_AS_ADVANCED(FORCE cpPlugins_AllInstances) - -SET( - _all_libs - cpExtensions - cpPlugins - cpPluginsDataObjects - ) -IF(USE_QT4) - LIST(APPEND _all_libs cpBaseQtApplication) - LIST(APPEND _all_libs cp_QCustomPlot) -ENDIF(USE_QT4) -SET(cpPlugins_Libraries ${_all_libs} CACHE STRING "cpPlugins base libraries") -MARK_AS_ADVANCED(FORCE cpPlugins_Libraries) - -SET(_all_libs ${cpPlugins_AllInstances} ${cpPlugins_Libraries}) -SET(_l_locations) -FOREACH(_l ${_all_libs}) - FIND_LIBRARY( - ${_l}_LIB NAMES ${_l} - PATHS - @PROJECT_BINARY_DIR@ - @CMAKE_INSTALL_PREFIX@/bin - @CMAKE_INSTALL_PREFIX@/lib - ${_l_locations} - ) - IF(${_l}_LIB) - MARK_AS_ADVANCED(FORCE ${_l}_LIB) - GET_FILENAME_COMPONENT(_dir ${${_l}_LIB} DIRECTORY) - LIST(APPEND _l_locations ${_dir}) - LIST(REMOVE_DUPLICATES _l_locations) - ENDIF(${_l}_LIB) -ENDFOREACH(_l) -IF(_l_locations) - LINK_DIRECTORIES(${_l_locations}) -ENDIF(_l_locations) - -## ============================== -## == Find include directories == -## ============================== - -## TODO: this is not completely correct!!! -INCLUDE_DIRECTORIES( - @CMAKE_INSTALL_PREFIX@/include - @CMAKE_INSTALL_PREFIX@/include/cpPlugins/cpInstances - @PROJECT_SOURCE_DIR@ - @PROJECT_BINARY_DIR@ - @PROJECT_SOURCE_DIR@/lib - @PROJECT_BINARY_DIR@/lib - @PROJECT_SOURCE_DIR@/lib/cpInstances - @PROJECT_BINARY_DIR@/lib/cpInstances +## == Some general configuration +include(@CMAKE_INSTALL_PREFIX@/lib/cmake/@PROJECT_NAME@/cpPlgDefinitions.cmake) +include(@CMAKE_INSTALL_PREFIX@/lib/cmake/@PROJECT_NAME@/cpPlgFunctions.cmake) +set( + cpPlugins_INSTALL_FILE + @CMAKE_INSTALL_PREFIX@/lib/cmake/@PROJECT_NAME@/cpPlgInstallCommands.cmake ) - -## ============================ -## == Find bash applications == -## ============================ - -SET( - _exec_programs - "@cpPlugins_bash_CreateRealConfig_APP@" - "@cpPlugins_bash_CreateInstances_APP@" - "@cpPlugins_bash_CreateDemanglers_APP@" - "@cpPlugins_bash_CreatePlugins_APP@" - "@cpPlugins_bash_HostCreator_APP@" +## == Automatically generated commands +@PACKAGE_INIT@ + +## == Include targets file +set(_targets "${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake") +if(EXISTS "${_targets}") + include("${_targets}") + check_required_components("@PROJECT_NAME@") +endif(EXISTS "${_targets}") + +## == Import bash applications +set( + _bash + ExecutePipeline + HostCreator + MOC ) - -SET(_b_locations) -FOREACH(_p ${_exec_programs}) - FIND_PROGRAM( - ${_p}_APP - NAMES ${_p} - HINTS /usr /usr/local - PATHS @CMAKE_INSTALL_PREFIX@/bin @PROJECT_BINARY_DIR@ ${_b_locations} - PATH_SUFFIXES bin sbin - DOC "Where is ${_prog}?" +foreach(_b ${_bash}) + add_executable(cpPlugins_${_b} IMPORTED) + set_property( + TARGET cpPlugins_${_b} + PROPERTY IMPORTED_LOCATION @CMAKE_INSTALL_PREFIX@/bin/cpPlugins_${_b} ) - IF(${_p}_APP) - MARK_AS_ADVANCED(FORCE ${_p}_APP) - GET_FILENAME_COMPONENT(_dir ${${_p}_APP} DIRECTORY) - LIST(APPEND _b_locations ${_dir}) - LIST(REMOVE_DUPLICATES _b_locations) - ENDIF(${_p}_APP) -ENDFOREACH(_p) - -## ========================== -## == Configuration values == -## ========================== - -SET(cpPlugins_NUMBER_OF_FILES "@cpPlugins_NUMBER_OF_FILES@" CACHE STRING "Internal") -SET(cpPlugins_PROCESS_DIMS "@cpPlugins_PROCESS_DIMS@" CACHE STRING "Internal") -SET(cpPlugins_VISUAL_DIMS "@cpPlugins_VISUAL_DIMS@" CACHE STRING "Internal") - -MARK_AS_ADVANCED(FORCE cpPlugins_NUMBER_OF_FILES) -MARK_AS_ADVANCED(FORCE cpPlugins_PROCESS_DIMS) -MARK_AS_ADVANCED(FORCE cpPlugins_VISUAL_DIMS) +endforeach(_b) ## eof - $RCSfile$ diff --git a/data/data.wxml b/data/data.wxml deleted file mode 100644 index 052e856..0000000 --- a/data/data.wxml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/data/read_write_image.wxml b/data/read_write_image.wxml deleted file mode 100644 index 5277ad1..0000000 --- a/data/read_write_image.wxml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/dependencies/cpPlugins_Install_CMAKE.sh b/dependencies/cpPlugins_Install_CMAKE.sh deleted file mode 100755 index 191927c..0000000 --- a/dependencies/cpPlugins_Install_CMAKE.sh +++ /dev/null @@ -1,198 +0,0 @@ -#!/bin/bash - -## ------------------------------------------------------------------------- -function abspath() -{ - pushd . > /dev/null - if [ -d "$1" ]; then - cd "$1" - dirs -l +0 - else - cd "`dirname \"$1\"`" - cur_dir=`dirs -l +0` - if [ "$cur_dir" == "/" ]; then - echo "$cur_dir`basename \"$1\"`" - else - echo "$cur_dir/`basename \"$1\"`" - fi - fi - popd > /dev/null -} - -## ------------------------------------------------------------------------- -function get_file_extension -{ - valid_extensions=("zip" "tar" "tar.gz" "tar.bz2") - actual_file=`abspath $1` - actual_ext="" - for ext in ${valid_extensions[@]}; do - test_str=`dirname $actual_file`/`basename $actual_file $ext` - if [ $test_str != $actual_file ]; then - actual_ext=$ext - fi - done - echo "$actual_ext" -} - -## ------------------------------------------------------------------------- -function print_help() -{ - echo "Usage: `basename $0` -f=compressed_code -c=source_dir -b=build_dir [-p=instalation_prefix] [-q=qmake_executable]" -} - -## ------------------------------------------------------------------------- -## Analyze command-line arguments -if [ $# -eq 0 ]; then - print_help - exit 1 -fi -prefix="${HOME}/local" -for i in "$@"; do - case $i in - -f=*|--file=*) - source_file="${i#*=}" - shift - ;; - -c=*|--source_dir=*) - source_dir="${i#*=}" - shift - ;; - -b=*|--build_dir=*) - build_dir="${i#*=}" - shift - ;; - -p=*|--prefix=*) - prefix="${i#*=}" - shift - ;; - -q=*|--qmake=*) - qmake_exec="${i#*=}" - shift - ;; - *) - ;; - esac -done - -## Check command line arguments -if [ "x$source_dir" == "x" ]; then - if [ "x$source_file" != "x" ]; then - base_path=`abspath $source_file` - base_ext=`get_file_extension $base_path` - base_dir=`dirname $base_path` - if [ "x$base_ext" != "x" ]; then - source_dir="$base_dir"/`basename $base_path .$base_ext` - else - echo "Error: Input compressed file extension not recognized." - exit 1 - fi - else - print_help - exit 1 - fi -fi -if [ "x$build_dir" == "x" ]; then - if [ "x$source_dir" != "x" ]; then - base_dir=$source_dir - if [ "${source_dir:$((${#str}-1)):1}" == "/" ]; then - base_dir=`echo $source_dir | rev | cut -c 2- | rev` - fi - build_dir="$base_dir-build" - else - print_help - exit 1 - fi -fi - -# Locate qmake executable -if [ "x$qmake_exec" == "x" ]; then - qmake_locations=("/usr/bin" "/usr/local/bin" "${HOME}/local/bin") - for loc in ${qmake_locations[@]}; do - qmake_file="$loc/qmake" - if [ -x $qmake_file ]; then - version=`$qmake_file --version | grep Using\ Qt\ version | cut -d ' ' -f 4` - if [ "${version:0:3}" == "4.8" ]; then - qmake_exec=$qmake_file - fi - fi - done -fi -qmake_exec=`abspath $qmake_exec` -if [ -x $qmake_exec ]; then - qt_options="--qt-gui --qt-qmake=$qmake_exec" -else - qt_options="--no-qt-gui" -fi - -## Other configuration variables -platform=`uname` -number_of_cores=`grep -c ^processor /proc/cpuinfo` -number_of_threads=`expr $number_of_cores / 2` -if [ "x$source_file" != "x" ]; then - source_file=`abspath $source_file` -fi -source_dir=`abspath $source_dir` -build_dir=`abspath $build_dir` - -echo "=====================================================================" -echo "==> Source file : $source_file" -echo "==> Source dir : $source_dir" -echo "==> Build dir : $build_dir" -echo "==> Prefix : $prefix" -echo "==> qmake : $qmake_exec" -echo "==> Qt options : $qt_options" -echo "==> Platform : $platform" -echo "==> Number of cores : $number_of_cores" -echo "==> Number of threads : $number_of_threads" -echo "=====================================================================" -read -n1 -r -p "Continue? [Y/N]... " key -echo -if [ "$key" != 'Y' -a "$key" != 'y' ] ; then - exit 1 -fi - -## Create paths -if [ "x$source_file" != "x" ]; then - echo -n "==> Cleaning directories... " - rm -rf $source_dir - rm -rf $build_dir - echo "done." - echo -n "==> Creating directories... " - mkdir -p $source_dir - mkdir -p $build_dir - echo "done." -fi - -## Extract source code -if [ "x$source_file" != "x" ]; then - echo -n "==> Extracting sources... " - base_path=`abspath $source_file` - base_ext=`get_file_extension $base_path` - if [ "$base_ext" == "zip" ]; then - echo unzip $base_path - elif [ "$base_ext" == "tar" ]; then - tar xf $base_path -C $source_dir --strip-components=1 - elif [ "$base_ext" == "tar.gz" ]; then - tar xzf $base_path -C $source_dir --strip-components=1 - elif [ "$base_ext" == "tar.bz2" ]; then - tar xjf $base_path -C $source_dir --strip-components=1 - fi - echo "done." -fi - -echo "==> Configuring sources... " -cd $build_dir -$source_dir/bootstrap --prefix=$prefix $qt_options -echo "==> Configuring sources... done." - -echo "==> Compiling sources..." -cd $build_dir -make -j$number_of_threads -echo "==> Compiling sources... done." - -echo "==> Installing package..." -cd $build_dir -make -j install -echo "==> Installing package... done." - -## eof - $RCSfile$ diff --git a/dependencies/cpPlugins_Install_Dependencies.py b/dependencies/cpPlugins_Install_Dependencies.py deleted file mode 100644 index b1d7813..0000000 --- a/dependencies/cpPlugins_Install_Dependencies.py +++ /dev/null @@ -1,383 +0,0 @@ -#!/usr/bin/python - -import glob, multiprocessing, os, platform, readline -from distutils import spawn - -## -------------------- -## -- Various values -- -## -------------------- - -system_name = platform.system( ) -process_count = multiprocessing.cpu_count( ) / 2 -home_dir = os.environ[ "HOME" ] - -## ------------------------ -## -- Filename completer -- -## ------------------------ - -def filename_completer( text, state ): - return ( glob.glob( text + '*' ) + [ None ] )[ state ] -# fed - -def get_filepath( message ): - readline.set_completer_delims( ' \t\n;' ) - readline.parse_and_bind( "tab: complete" ) - readline.set_completer( filename_completer ) - return os.path.abspath( raw_input( message ) ) -# fed - -## -------------------- -## -- File extractor -- -## -------------------- - -def file_extract( filename, outdir ): - real_ext = None - for ext in [ ".zip", ".tar", ".tar.gz", ".tar.bz2" ]: - if filename[ len( filename ) - len( ext ) : ] == ext: - real_ext = ext - # fi - # rof - command = None - if real_ext == ".zip": - command = "unzip " + filename + " -d " + outdir - elif real_ext == ".tar": - command = "tar xf " + filename + " -C " + outdir + " --strip-components=1" - elif real_ext == ".tar.gz": - command = "tar xzf " + filename + " -C " + outdir + " --strip-components=1" - elif real_ext == ".tar.bz2": - command = "tar xjf " + filename + " -C " + outdir + " --strip-components=1" - # fi - if command <> None: - print( "\tExtracting " + filename + "..." ) - res = os.system( "mkdir -p " + outdir + " && " + command ) - print( "\t\tdone." ) - if res == 0: - return True - else: - return False - else: - return False - # fi -# fed - -## ------------------ -## -- Look for Qt4 -- -## ------------------ - -qmake_locations = [] -qmake_progs = [] -if system_name == "Linux": - qmake_locations = [ - "/usr/bin", - "/usr/local/bin", - home_dir + "/bin", - home_dir + "/local/bin" - ] - qmake_progs = [ "qmake", "qmake-qt4" ] -# fi - -qmake_paths = [] -for prog in qmake_progs: - for loc in qmake_locations: - path = spawn.find_executable( loc + "/" + prog ) - if path <> None: - qmake_paths.append( path ) - # rof -# rof - -print( "Please choose one configuration for Qt4:" ) -for i in range( len( qmake_paths ) ): - print( "\t" + str( i ) + ": " + qmake_paths[ i ] ) -# rof -print( "\t" + str( len( qmake_paths ) + 0 ) + ": Give another installation path (path to qmake)." ) -print( "\t" + str( len( qmake_paths ) + 1 ) + ": Build from scratch." ) -qmake_opt = -1 -while qmake_opt == -1: - qmake_opt = int( raw_input( "\t---> " ) ) - if qmake_opt < 0 or qmake_opt > len( qmake_paths ) + 1: - qmake_opt = -1 - # fi -# elihw - -qmake_exec = None -qmake_src = None -if qmake_opt == len( qmake_paths ): - qmake_exec = get_filepath( "Choose your own Qt4 installation: " ) - while not os.path.isfile( qmake_exec ): - qmake_exec = get_filepath( "Choose your own Qt4 installation: " ) - # elihw -elif qmake_opt == len( qmake_paths ) + 1: - qmake_src = get_filepath( "Choose your own Qt4 source file: " ) - while not os.path.isfile( qmake_src ): - qmake_src = get_filepath( "Choose your own Qt4 source file: " ) - # elihw -else: - qmake_exec = qmake_paths[ qmake_opt ] -# fi - -## -------------------- -## -- Look for CMake -- -## -------------------- - -cmake_locations = [] -cmake_progs = [] -if system_name == "Linux": - cmake_locations = [ - "/usr/bin", - "/usr/local/bin", - home_dir + "/bin", - home_dir + "/local/bin" - ] - cmake_progs = [ "cmake" ] -# fi - -cmake_paths = [] -for prog in cmake_progs: - for loc in cmake_locations: - path = spawn.find_executable( loc + "/" + prog ) - if path <> None: - cmake_paths.append( path ) - # rof -# rof - -print( "Please choose one configuration for CMake:" ) -for i in range( len( cmake_paths ) ): - print( "\t" + str( i ) + ": " + cmake_paths[ i ] ) -# rof -print( "\t" + str( len( cmake_paths ) + 0 ) + ": Give another installation path (path to cmake)." ) -print( "\t" + str( len( cmake_paths ) + 1 ) + ": Build from scratch." ) -cmake_opt = -1 -while cmake_opt == -1: - cmake_opt = int( raw_input( "\t---> " ) ) - if cmake_opt < 0 or cmake_opt > len( cmake_paths ) + 1: - cmake_opt = -1 - # fi -# elihw - -cmake_exec = None -cmake_src = None -if cmake_opt == len( cmake_paths ): - cmake_exec = get_filepath( "Choose your own CMake installation: " ) - while not os.path.isfile( cmake_exec ): - cmake_exec = get_filepath( "Choose your own CMake installation: " ) - # elihw -elif cmake_opt == len( cmake_paths ) + 1: - cmake_src = get_filepath( "Choose your own CMake source file: " ) - while not os.path.isfile( cmake_src ): - cmake_src = get_filepath( "Choose your own CMake source file: " ) - # elihw -else: - cmake_exec = cmake_paths[ cmake_opt ] -# fi - -## ------------------ -## -- Look for ITK -- -## ------------------ - -itk_src = get_filepath( "Choose your own ITK source file: " ) -while not os.path.isfile( itk_src ): - itk_src = get_filepath( "Choose your own ITK source file: " ) -# elihw - -## ------------------ -## -- Look for VTK -- -## ------------------ - -vtk_src = get_filepath( "Choose your own VTK source file: " ) -while not os.path.isfile( vtk_src ): - vtk_src = get_filepath( "Choose your own VTK source file: " ) -# elihw - -## -------------------------- -## -- Miscelaneous options -- -## -------------------------- - -build_prefix = get_filepath( "Build prefix: " ) -install_prefix = get_filepath( "Installation prefix: " ) -build_type = raw_input( "Build type [release/debug]: " ).lower( ) - -os.system( "mkdir -p " + build_prefix ) -os.system( "mkdir -p " + install_prefix ) - -## ------------------- -## -- Extract files -- -## ------------------- - -print( "Extracting source code... " ) -if qmake_src <> None: - file_extract( qmake_src, build_prefix + "/qt4-source" ) -# fi -if cmake_src <> None: - file_extract( cmake_src, build_prefix + "/cmake-source" ) -# fi -file_extract( itk_src, build_prefix + "/itk-source" ) -file_extract( vtk_src, build_prefix + "/vtk-source" ) -print( " done!" ) - -## --------------- -## -- Build Qt4 -- -## --------------- - -if qmake_src <> None: - full = raw_input( "\tWould you like to perform a full Qt4 build [y/n]? " ) - full.lower( ) - - qt4_source = os.path.abspath( build_prefix + "/qt4-source" ) - qt4_build = os.path.abspath( build_prefix + "/qt4-build" ) - os.system( "mkdir -p " + qt4_build ) - - config_command = qt4_source + "/configure" - config_command += " -prefix " + install_prefix - config_command += " -" + build_type - config_command += " -opensource -shared -fast -no-webkit -optimized-qmake -confirm-license" - if full[ 0 ] == "n": - config_command += " -no-phonon -no-phonon-backend -no-openvg -nomake demos -nomake examples" - # fi - ## MACOS: -no-framework - - ## Build and install - res = os.system( "cd " + qt4_build + " && " + config_command ) - if res <> 0: - print( "Error configuring Qt4." ) - exit( 1 ) - # fi - res = os.system( "cd " + qt4_build + " && make -j" + str( process_count ) ) - if res <> 0: - print( "Error compiling Qt4." ) - exit( 1 ) - # fi - res = os.system( "cd " + qt4_build + " && make -j install" ) - if res <> 0: - print( "Error installing Qt4." ) - exit( 1 ) - # fi - qmake_exec = install_prefix + "/bin/qmake" -# fi - -## ----------------- -## -- Build CMake -- -## ----------------- - -if cmake_src <> None: - cmake_source = os.path.abspath( build_prefix + "/cmake-source" ) - cmake_build = os.path.abspath( build_prefix + "/cmake-build" ) - os.system( "mkdir -p " + cmake_build ) - - config_command = cmake_source + "/bootstrap" - config_command += " --prefix " + install_prefix - if qmake_exec <> None: - config_command += " --qt-gui --qt-qmake=" + qmake_exec - else: - config_command += " --no-qt-gui" - # fi - - ## Build and install - res = os.system( "cd " + cmake_build + " && " + config_command ) - if res <> 0: - print( "Error configuring CMake." ) - exit( 1 ) - # fi - res = os.system( "cd " + cmake_build + " && make -j" + str( process_count ) ) - if res <> 0: - print( "Error compiling CMake." ) - exit( 1 ) - # fi - res = os.system( "cd " + cmake_build + " && make -j install" ) - if res <> 0: - print( "Error installing CMake." ) - exit( 1 ) - # fi - cmake_exec = install_prefix + "/bin/cmake" -# fi - -## --------------- -## -- Build VTK -- -## --------------- - -vtk_source = os.path.abspath( build_prefix + "/vtk-source" ) -vtk_build = os.path.abspath( build_prefix + "/vtk-build" ) -os.system( "mkdir -p " + vtk_build ) - -kitware_build = "MinSizeRel" -if build_type == "debug": - kitware_build = "Debug" -# fi - -vtk_configure = cmake_exec -vtk_configure += " -DCMAKE_CXX_FLAGS:STRING=-std=c++11" -vtk_configure += " -DBUILD_DOCUMENTATION:BOOL=OFF" -vtk_configure += " -DBUILD_EXAMPLES:BOOL=OFF" -vtk_configure += " -DBUILD_SHARED_LIBS:BOOL=ON" -vtk_configure += " -DBUILD_TESTING:BOOL=OFF" -vtk_configure += " -DCMAKE_BUILD_TYPE:STRING=" + kitware_build -if qmake_exec <> None: - vtk_configure += " -DQT_QMAKE_EXECUTABLE:PATH=" + qmake_exec - vtk_configure += " -DModule_vtkGUISupportQt:BOOL=ON" - vtk_configure += " -DModule_vtkGUISupportQtOpenGL:BOOL=ON" - vtk_configure += " -DModule_vtkGUISupportQtSQL:BOOL=OFF" - vtk_configure += " -DModule_vtkGUISupportQtWebkit:BOOL=OFF" -# fi -vtk_configure += " -DCMAKE_INSTALL_PREFIX:PATH=" + install_prefix -vtk_configure += " " + vtk_source - -## Build and install -res = os.system( "cd " + vtk_build + " && " + vtk_configure ) -if res <> 0: - print( "Error configuring VTK." ) - exit( 1 ) -# fi -res = os.system( "cd " + vtk_build + " && make -j" + str( process_count ) ) -if res <> 0: - print( "Error compiling VTK." ) - exit( 1 ) -# fi -res = os.system( "cd " + vtk_build + " && make -j install" ) -if res <> 0: - print( "Error installing VTK." ) - exit( 1 ) -# fi - -## --------------- -## -- Build ITK -- -## --------------- - -itk_source = os.path.abspath( build_prefix + "/itk-source" ) -itk_build = os.path.abspath( build_prefix + "/itk-build" ) -os.system( "mkdir -p " + itk_build ) - -kitware_build = "MinSizeRel" -if build_type == "debug": - kitware_build = "Debug" -# fi - -itk_configure = cmake_exec -itk_configure += " -DCMAKE_CXX_FLAGS:STRING=-std=c++11" -itk_configure += " -DBUILD_DOCUMENTATION:BOOL=OFF" -itk_configure += " -DBUILD_EXAMPLES:BOOL=OFF" -itk_configure += " -DBUILD_SHARED_LIBS:BOOL=ON" -itk_configure += " -DBUILD_TESTING:BOOL=OFF" -itk_configure += " -DCMAKE_BUILD_TYPE:STRING=" + kitware_build -itk_configure += " -DModule_ITKReview:BOOL=ON" -itk_configure += " -DModule_ITKVtkGlue:BOOL=OFF" -itk_configure += " -DModule_ParabolicMorphology:BOOL=ON" -itk_configure += " -DCMAKE_INSTALL_PREFIX:PATH=" + install_prefix -itk_configure += " " + itk_source - -## Build and install -res = os.system( "cd " + itk_build + " && " + itk_configure ) -if res <> 0: - print( "Error configuring ITK." ) - exit( 1 ) -# fi -res = os.system( "cd " + itk_build + " && make -j" + str( process_count ) ) -if res <> 0: - print( "Error compiling ITK." ) - exit( 1 ) -# fi -res = os.system( "cd " + itk_build + " && make -j install" ) -if res <> 0: - print( "Error installing ITK." ) - exit( 1 ) -# fi - -## eof - $RCSfile$ diff --git a/dependencies/cpPlugins_Install_ITK.sh b/dependencies/cpPlugins_Install_ITK.sh deleted file mode 100755 index d4b90c5..0000000 --- a/dependencies/cpPlugins_Install_ITK.sh +++ /dev/null @@ -1,216 +0,0 @@ -#!/bin/bash - -## ------------------------------------------------------------------------- -function abspath() -{ - pushd . > /dev/null - if [ -d "$1" ]; then - cd "$1" - dirs -l +0 - else - cd "`dirname \"$1\"`" - cur_dir=`dirs -l +0` - if [ "$cur_dir" == "/" ]; then - echo "$cur_dir`basename \"$1\"`" - else - echo "$cur_dir/`basename \"$1\"`" - fi - fi - popd > /dev/null -} - -## ------------------------------------------------------------------------- -function get_file_extension -{ - valid_extensions=("zip" "tar" "tar.gz" "tar.bz2") - actual_file=`abspath $1` - actual_ext="" - for ext in ${valid_extensions[@]}; do - test_str=`dirname $actual_file`/`basename $actual_file $ext` - if [ $test_str != $actual_file ]; then - actual_ext=$ext - fi - done - echo "$actual_ext" -} - -## ------------------------------------------------------------------------- -function print_help() -{ - echo "Usage: `basename $0` -f=compressed_code -c=source_dir -b=build_dir [-p=instalation_prefix] [-m=cmake_executable] [-t=build_type[MinSizeRel/Debug/Release]]" -} - -## ------------------------------------------------------------------------- -## Analyze command-line arguments -if [ $# -eq 0 ]; then - print_help - exit 1 -fi -prefix="${HOME}/local" -build_type="MinSizeRel" -for i in "$@"; do - case $i in - -f=*|--file=*) - source_file="${i#*=}" - shift - ;; - -c=*|--source_dir=*) - source_dir="${i#*=}" - shift - ;; - -b=*|--build_dir=*) - build_dir="${i#*=}" - shift - ;; - -t=*|--build_type=*) - build_type="${i#*=}" - shift - ;; - -p=*|--prefix=*) - prefix="${i#*=}" - shift - ;; - -m=*|--cmake=*) - cmake_exec="${i#*=}" - shift - ;; - *) - ;; - esac -done - -## Check command line arguments -if [ "x$source_dir" == "x" ]; then - if [ "x$source_file" != "x" ]; then - base_path=`abspath $source_file` - base_ext=`get_file_extension $base_path` - base_dir=`dirname $base_path` - if [ "x$base_ext" != "x" ]; then - source_dir="$base_dir"/`basename $base_path .$base_ext` - else - echo "Error: Input compressed file extension not recognized." - exit 1 - fi - else - print_help - exit 1 - fi -fi -if [ "x$build_dir" == "x" ]; then - if [ "x$source_dir" != "x" ]; then - base_dir=$source_dir - if [ "${source_dir:$((${#str}-1)):1}" == "/" ]; then - base_dir=`echo $source_dir | rev | cut -c 2- | rev` - fi - build_dir="$base_dir-build" - else - print_help - exit 1 - fi -fi - -## Locate cmake executable -if [ "x$cmake_exec" == "x" ]; then - cmake_locations=("/usr/bin" "/usr/local/bin" "${HOME}/local/bin") - cmake_ver="" - for loc in ${cmake_locations[@]}; do - cmake_file="$loc/cmake" - if [ -x $cmake_file ]; then - str=`$cmake_file --version | grep version` - version=${str:14} - if [ "$cmake_ver" \< "$version" ]; then - cmake_ver=$version - cmake_exec=$cmake_file - fi - fi - done -fi -if [ ! -x $cmake_exec ]; then - echo "ERROR: no valid cmake found." - exit 1 -fi -cmake_exec=`abspath $cmake_exec` - -## Other configuration variables -platform=`uname` -number_of_cores=`grep -c ^processor /proc/cpuinfo` -number_of_threads=`expr $number_of_cores / 2` -if [ "x$source_file" != "x" ]; then - source_file=`abspath $source_file` -fi -source_dir=`abspath $source_dir` -build_dir=`abspath $build_dir` - -echo "=====================================================================" -echo "==> Source file : $source_file" -echo "==> Source dir : $source_dir" -echo "==> Build dir : $build_dir" -echo "==> Build type : $build_type" -echo "==> Prefix : $prefix" -echo "==> cmake : $cmake_exec" -echo "==> Platform : $platform" -echo "==> Number of cores : $number_of_cores" -echo "==> Number of threads : $number_of_threads" -echo "=====================================================================" -read -n1 -r -p "Continue? [Y/N]... " key -echo -if [ "$key" != 'Y' -a "$key" != 'y' ] ; then - exit 1 -fi - -## Create paths -if [ "x$source_file" != "x" ]; then - echo -n "==> Cleaning directories... " - rm -rf $source_dir - rm -rf $build_dir - echo "done." - echo -n "==> Creating directories... " - mkdir -p $source_dir - mkdir -p $build_dir - echo "done." -fi - -## Extract source code -if [ "x$source_file" != "x" ]; then - echo -n "==> Extracting sources... " - base_path=`abspath $source_file` - base_ext=`get_file_extension $base_path` - if [ "$base_ext" == "zip" ]; then - echo unzip $base_path - elif [ "$base_ext" == "tar" ]; then - tar xf $base_path -C $source_dir --strip-components=1 - elif [ "$base_ext" == "tar.gz" ]; then - tar xzf $base_path -C $source_dir --strip-components=1 - elif [ "$base_ext" == "tar.bz2" ]; then - tar xjf $base_path -C $source_dir --strip-components=1 - fi - echo "done." -fi - -echo "==> Configuring sources... " -cd $build_dir -$cmake_exec \ - -DCMAKE_CXX_FLAGS:STRING=-std=c++11 \ - -DBUILD_DOCUMENTATION:BOOL=OFF \ - -DBUILD_EXAMPLES:BOOL=OFF \ - -DBUILD_SHARED_LIBS:BOOL=ON \ - -DBUILD_TESTING:BOOL=OFF \ - -DCMAKE_BUILD_TYPE:STRING=$build_type \ - -DModule_ITKReview:BOOL=ON \ - -DModule_ITKVtkGlue:BOOL=OFF \ - -DModule_ParabolicMorphology:BOOL=ON \ - -DCMAKE_INSTALL_PREFIX:PATH=$prefix \ - ${source_dir} -echo "==> Configuring sources... done." - -echo "==> Compiling sources..." -cd $build_dir -make -j$number_of_threads -echo "==> Compiling sources... done." - -echo "==> Installing package..." -cd $build_dir -make -j install -echo "==> Installing package... done." - -## eof - $RCSfile$ diff --git a/dependencies/cpPlugins_Install_QT4.sh b/dependencies/cpPlugins_Install_QT4.sh deleted file mode 100755 index 36c5d13..0000000 --- a/dependencies/cpPlugins_Install_QT4.sh +++ /dev/null @@ -1,219 +0,0 @@ -#!/bin/bash - -function abspath() -{ - pushd . > /dev/null - if [ -d "$1" ]; then - cd "$1" - dirs -l +0 - else - cd "`dirname \"$1\"`" - cur_dir=`dirs -l +0` - if [ "$cur_dir" == "/" ]; then - echo "$cur_dir`basename \"$1\"`" - else - echo "$cur_dir/`basename \"$1\"`" - fi - fi - popd > /dev/null -} - -function get_file_extension -{ - valid_extensions=("zip" "tar" "tar.gz" "tar.bz2") - actual_file=`abspath $1` - actual_ext="" - for ext in ${valid_extensions[@]}; do - test_str=`dirname $actual_file`/`basename $actual_file $ext` - if [ $test_str != $actual_file ]; then - actual_ext=$ext - fi - done - echo "$actual_ext" -} - -function print_help() -{ - echo "Usage: `basename $0` -f=compressed_code -c=source_dir -b=build_dir [-t=build_type[release/debug]] [-p=instalation_prefix] [--full]" -} - -## Analyze command-line arguments -if [ $# -eq 0 ]; then - print_help - exit 1 -fi -full_compile="0" -prefix="${HOME}/local" -build_type="release" -for i in "$@"; do - case $i in - -f=*|--file=*) - source_file="${i#*=}" - shift - ;; - -c=*|--source_dir=*) - source_dir="${i#*=}" - shift - ;; - -b=*|--build_dir=*) - build_dir="${i#*=}" - shift - ;; - -t=*|--build_type=*) - build_type="${i#*=}" - shift - ;; - -p=*|--prefix=*) - prefix="${i#*=}" - shift - ;; - --full) - full_compile="1" - shift - ;; - *) - ;; - esac -done - -## Check command line arguments -if [ "x$source_dir" == "x" ]; then - if [ "x$source_file" != "x" ]; then - base_path=`abspath $source_file` - base_ext=`get_file_extension $base_path` - base_dir=`dirname $base_path` - if [ "x$base_ext" != "x" ]; then - source_dir="$base_dir"/`basename $base_path .$base_ext` - else - echo "Error: Input compressed file extension not recognized." - exit 1 - fi - else - print_help - exit 1 - fi -fi -if [ "x$build_dir" == "x" ]; then - if [ "x$source_dir" != "x" ]; then - base_dir=$source_dir - if [ "${source_dir:$((${#str}-1)):1}" == "/" ]; then - base_dir=`echo $source_dir | rev | cut -c 2- | rev` - fi - build_dir="$base_dir-build" - else - print_help - exit 1 - fi -fi - -## Other configuration variables -platform=`uname` -particular_options="" -patch_file="" -if [ "$platform" == "Darwin" ]; then - particular_options=-no-framework - bash_path=`abspath $0` - bash_dir=`dirname $bash_path` - patch_file=$bash_dir/qt-4.8.6.patch -fi -number_of_cores=`grep -c ^processor /proc/cpuinfo` -number_of_threads=`expr $number_of_cores / 2` -if [ "x$source_file" != "x" ]; then - source_file=`abspath $source_file` -fi -source_dir=`abspath $source_dir` -build_dir=`abspath $build_dir` - -echo "=====================================================================" -echo "==> Source file : $source_file" -echo "==> Source dir : $source_dir" -echo "==> Build dir : $build_dir" -echo "==> Build type : $build_type" -echo "==> Prefix : $prefix" -echo "==> Full compile : $full_compile" -echo "==> Platform : $platform" -echo "==> Number of cores : $number_of_cores" -echo "==> Number of threads : $number_of_threads" -echo "==> Patch file : $patch_file" -echo "=====================================================================" -read -n1 -r -p "Continue? [Y/N]... " key -echo -if [ "$key" != 'Y' -a "$key" != 'y' ] ; then - exit 1 -fi - -## Create paths -if [ "x$source_file" != "x" ]; then - echo -n "==> Cleaning directories... " - rm -rf $source_dir - rm -rf $build_dir - echo "done." - echo -n "==> Creating directories... " - mkdir -p $source_dir - mkdir -p $build_dir - echo "done." -fi - -## Extract source code -if [ "x$source_file" != "x" ]; then - echo -n "==> Extracting sources... " - base_path=`abspath $source_file` - base_ext=`get_file_extension $base_path` - if [ "$base_ext" == "zip" ]; then - echo unzip $base_path - elif [ "$base_ext" == "tar" ]; then - tar xf $base_path -C $source_dir --strip-components=1 - elif [ "$base_ext" == "tar.gz" ]; then - tar xzf $base_path -C $source_dir --strip-components=1 - elif [ "$base_ext" == "tar.bz2" ]; then - tar xjf $base_path -C $source_dir --strip-components=1 - fi - echo "done." -fi - -# Apply patch -if [ "x$patch_file" != "x" ]; then - echo -n "==> Applying patch... " - cd $source_dir - patch -p0 < $patch_file - echo "done." -fi - -echo "==> Configuring sources... " -cd $build_dir -if [ "x$full_compile" == "xfull" ]; then - $source_dir/configure \ - -prefix $prefix \ - -$build_type \ - -opensource -shared -fast \ - -no-webkit \ - -optimized-qmake \ - $particular_options \ - -confirm-license -else - $source_dir/configure \ - -prefix $prefix \ - -$build_type \ - -opensource -shared -fast \ - -no-phonon \ - -no-phonon-backend \ - -no-webkit \ - -no-openvg \ - -nomake demos -nomake examples \ - -optimized-qmake \ - $particular_options \ - -confirm-license -fi -echo "==> Configuring sources... done." - -echo "==> Compiling sources..." -cd $build_dir -make -j$number_of_threads -echo "==> Compiling sources... done." - -echo "==> Installing package..." -cd $build_dir -make -j install -echo "==> Installing package... done." - -## eof - $RCSfile$ diff --git a/dependencies/cpPlugins_Install_VTK.sh b/dependencies/cpPlugins_Install_VTK.sh deleted file mode 100755 index 9c5776a..0000000 --- a/dependencies/cpPlugins_Install_VTK.sh +++ /dev/null @@ -1,256 +0,0 @@ -#!/bin/bash - -## ------------------------------------------------------------------------- -function abspath() -{ - pushd . > /dev/null - if [ -d "$1" ]; then - cd "$1" - dirs -l +0 - else - cd "`dirname \"$1\"`" - cur_dir=`dirs -l +0` - if [ "$cur_dir" == "/" ]; then - echo "$cur_dir`basename \"$1\"`" - else - echo "$cur_dir/`basename \"$1\"`" - fi - fi - popd > /dev/null -} - -## ------------------------------------------------------------------------- -function get_file_extension -{ - valid_extensions=("zip" "tar" "tar.gz" "tar.bz2") - actual_file=`abspath $1` - actual_ext="" - for ext in ${valid_extensions[@]}; do - test_str=`dirname $actual_file`/`basename $actual_file $ext` - if [ $test_str != $actual_file ]; then - actual_ext=$ext - fi - done - echo "$actual_ext" -} - -## ------------------------------------------------------------------------- -function print_help() -{ - echo "Usage: `basename $0` -f=compressed_code -c=source_dir -b=build_dir [-p=instalation_prefix] [-q=qmake_executable] [-m=cmake_executable] [-t=build_type[MinSizeRel/Debug/Release]]" -} - -## ------------------------------------------------------------------------- -## Analyze command-line arguments -if [ $# -eq 0 ]; then - print_help - exit 1 -fi -prefix="${HOME}/local" -build_type="MinSizeRel" -for i in "$@"; do - case $i in - -f=*|--file=*) - source_file="${i#*=}" - shift - ;; - -c=*|--source_dir=*) - source_dir="${i#*=}" - shift - ;; - -b=*|--build_dir=*) - build_dir="${i#*=}" - shift - ;; - -t=*|--build_type=*) - build_type="${i#*=}" - shift - ;; - -p=*|--prefix=*) - prefix="${i#*=}" - shift - ;; - -m=*|--cmake=*) - cmake_exec="${i#*=}" - shift - ;; - -q=*|--qmake=*) - qmake_exec="${i#*=}" - shift - ;; - *) - ;; - esac -done - -## Check command line arguments -if [ "x$source_dir" == "x" ]; then - if [ "x$source_file" != "x" ]; then - base_path=`abspath $source_file` - base_ext=`get_file_extension $base_path` - base_dir=`dirname $base_path` - if [ "x$base_ext" != "x" ]; then - source_dir="$base_dir"/`basename $base_path .$base_ext` - else - echo "Error: Input compressed file extension not recognized." - exit 1 - fi - else - print_help - exit 1 - fi -fi -if [ "x$build_dir" == "x" ]; then - if [ "x$source_dir" != "x" ]; then - base_dir=$source_dir - if [ "${source_dir:$((${#str}-1)):1}" == "/" ]; then - base_dir=`echo $source_dir | rev | cut -c 2- | rev` - fi - build_dir="$base_dir-build" - else - print_help - exit 1 - fi -fi - -## Locate cmake executable -if [ "x$cmake_exec" == "x" ]; then - cmake_locations=("/usr/bin" "/usr/local/bin" "${HOME}/local/bin") - cmake_ver="" - for loc in ${cmake_locations[@]}; do - cmake_file="$loc/cmake" - if [ -x $cmake_file ]; then - str=`$cmake_file --version | grep version` - version=${str:14} - if [ "$cmake_ver" \< "$version" ]; then - cmake_ver=$version - cmake_exec=$cmake_file - fi - fi - done -fi -if [ ! -x $cmake_exec ]; then - echo "ERROR: no valid cmake found." - exit 1 -fi -cmake_exec=`abspath $cmake_exec` - -# Locate qmake executable -if [ "x$qmake_exec" == "x" ]; then - qmake_locations=("/usr/bin" "/usr/local/bin" "${HOME}/local/bin") - for loc in ${qmake_locations[@]}; do - qmake_file="$loc/qmake" - if [ -x $qmake_file ]; then - version=`$qmake_file --version | grep Using\ Qt\ version | cut -d ' ' -f 4` - if [ "${version:0:3}" == "4.8" ]; then - qmake_exec=$qmake_file - fi - fi - done -fi -qmake_exec=`abspath $qmake_exec` -if [ -x $qmake_exec ]; then - use_qt="1" -else - use_qt="0" -fi - -## Other configuration variables -platform=`uname` -number_of_cores=`grep -c ^processor /proc/cpuinfo` -number_of_threads=`expr $number_of_cores / 2` -if [ "x$source_file" != "x" ]; then - source_file=`abspath $source_file` -fi -source_dir=`abspath $source_dir` -build_dir=`abspath $build_dir` - -echo "=====================================================================" -echo "==> Source file : $source_file" -echo "==> Source dir : $source_dir" -echo "==> Build dir : $build_dir" -echo "==> Build type : $build_type" -echo "==> Prefix : $prefix" -echo "==> cmake : $cmake_exec" -echo "==> qmake : $qmake_exec" -echo "==> Use Qt : $use_qt" -echo "==> Platform : $platform" -echo "==> Number of cores : $number_of_cores" -echo "==> Number of threads : $number_of_threads" -echo "=====================================================================" -read -n1 -r -p "Continue? [Y/N]... " key -echo -if [ "$key" != 'Y' -a "$key" != 'y' ] ; then - exit 1 -fi - -## Create paths -if [ "x$source_file" != "x" ]; then - echo -n "==> Cleaning directories... " - rm -rf $source_dir - rm -rf $build_dir - echo "done." - echo -n "==> Creating directories... " - mkdir -p $source_dir - mkdir -p $build_dir - echo "done." -fi - -## Extract source code -if [ "x$source_file" != "x" ]; then - echo -n "==> Extracting sources... " - base_path=`abspath $source_file` - base_ext=`get_file_extension $base_path` - if [ "$base_ext" == "zip" ]; then - echo unzip $base_path - elif [ "$base_ext" == "tar" ]; then - tar xf $base_path -C $source_dir --strip-components=1 - elif [ "$base_ext" == "tar.gz" ]; then - tar xzf $base_path -C $source_dir --strip-components=1 - elif [ "$base_ext" == "tar.bz2" ]; then - tar xjf $base_path -C $source_dir --strip-components=1 - fi - echo "done." -fi - -echo "==> Configuring sources... " -cd $build_dir -if [ "$use_qt" == "1" ]; then - $cmake_exec \ - -DCMAKE_CXX_FLAGS:STRING=-std=c++11 \ - -DBUILD_DOCUMENTATION:BOOL=OFF \ - -DBUILD_EXAMPLES:BOOL=OFF \ - -DBUILD_SHARED_LIBS:BOOL=ON \ - -DBUILD_TESTING:BOOL=OFF \ - -DQT_QMAKE_EXECUTABLE:PATH=$qmake_exec \ - -DCMAKE_BUILD_TYPE:STRING=$build_type \ - -DModule_vtkGUISupportQt:BOOL=ON \ - -DModule_vtkGUISupportQtOpenGL:BOOL=ON \ - -DModule_vtkGUISupportQtSQL:BOOL=OFF \ - -DModule_vtkGUISupportQtWebkit:BOOL=OFF \ - -DCMAKE_INSTALL_PREFIX:PATH=$prefix \ - ${source_dir} -else - $cmake_exec \ - -DCMAKE_CXX_FLAGS:STRING=-std=c++11 \ - -DBUILD_DOCUMENTATION:BOOL=OFF \ - -DBUILD_EXAMPLES:BOOL=OFF \ - -DBUILD_SHARED_LIBS:BOOL=ON \ - -DBUILD_TESTING:BOOL=OFF \ - -DCMAKE_BUILD_TYPE:STRING=$build_type \ - -DCMAKE_INSTALL_PREFIX:PATH=$prefix \ - ${source_dir} -fi -echo "==> Configuring sources... done." - -echo "==> Compiling sources..." -cd $build_dir -make -j$number_of_threads -echo "==> Compiling sources... done." - -echo "==> Installing package..." -cd $build_dir -make -j install -echo "==> Installing package... done." - -## eof - $RCSfile$ diff --git a/dependencies/cpPlugins_ThirdParty_Install_linux.sh b/dependencies/cpPlugins_ThirdParty_Install_linux.sh deleted file mode 100755 index a2c92dc..0000000 --- a/dependencies/cpPlugins_ThirdParty_Install_linux.sh +++ /dev/null @@ -1,317 +0,0 @@ -#!/bin/bash - -## ==================================== -## == Some base configuration values == -## ==================================== - -cmake_min_version="3.0" -qt_min_version="4.8" -number_of_cores=`grep -c ^processor /proc/cpuinfo` -number_of_threads=`expr $number_of_cores / 2` - -## ================================= -## == Compare two version strings == -## ================================= - -function version_gt() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"; } - -## ============================== -## == Try to locate base tools == -## ============================== - -gpp_exe=`which g++` -if [ -z "gpp_exe" ]; then - echo "ERROR: \"g++\" program was not found." - echo "ERROR: Please install \"g++\"" -fi - -make_exe=`which make` -if [ -z "$make_exe" ]; then - echo "ERROR: \"make\" program was not found." - echo "ERROR: Please install \"make\"" -fi - -## =============== -## == Verify Qt == -## =============== - -read -p "Do you want to use Qt4.8? [y/N] " -n 1 -r -echo -if [[ $REPLY =~ ^[Yy]$ ]]; then - cont=true - qmake_exe=`which qmake` - while [ $cont == true ]; do - if [ -z "$qmake_exe" ]; then - read -e -p "Please provide a valid location for qmake: " tmp - eval tmp=$tmp - qmake_exe=`readlink -f $tmp` - fi - read -p "I am going to use \"$qmake_exe\" as the entry tool for Qt. Is this ok? [y/N] " -n 1 -r - echo - if [[ $REPLY =~ ^[Nn]$ ]]; then - qmake_exe="" - else - cont=false - fi - done - qt_version=`$qmake_exe -v | grep Using\ Qt\ version | sed 's/Using\ Qt\ version\ //g'` - if version_gt $qt_min_version $qt_version; then - echo "FATAL ERROR: your Qt version is $qt_version, but needed version should be at least $qt_min_version" - fi -fi - -## ================== -## == Verify cmake == -## ================== - -cmake_qt_options="--no-qt-gui" -if [ -x "$qmake_exe" ]; then - cmake_qt_options="--qt-gui --qt-qmake=$qmake_exe" -fi - -cont=true -cmake_exe=`which cmake` -while [ $cont == true ]; do - if [ -z "$cmake_exe" ]; then - read -e -p "Please provide a valid location for cmake: " tmp - eval tmp=$tmp - cmake_exe=`readlink -f $tmp` - fi - read -p "I am going to use \"$cmake_exe\". Is this ok? [y/N] " -n 1 -r - echo - if [[ $REPLY =~ ^[Nn]$ ]]; then - cmake_exe="" - else - cont=false - fi -done -if [ -z $cmake_exe ]; then - echo "FATAL ERROR: cmake is really needed to build cpPlugins." - exit 1 -fi - -cmake_mime=`file -bzk --mime-type $cmake_exe` -if [ "$cmake_mime" != "application/x-executable" ]; then - echo "WARNING: I will try to compile cmake..." - if [[ -f $cmake_exe ]]; then - if [ "$cmake_mime" == "application/x-tar" ]; then - sub_mime=`file -b --mime-type $cmake_exe` - if [ $sub_mime == "application/gzip" ]; then - cmake_source_dir=`dirname $cmake_exe`/`basename $cmake_exe .tar.gz` - cmake_binary_dir=`dirname $cmake_exe`/`basename $cmake_exe .tar.gz`-build - echo -n "==> Extracting cmake sources... " - rm -rf $cmake_source_dir $cmake_binary_dir - mkdir -p $cmake_source_dir $cmake_binary_dir - tar xzf $cmake_exe -C $cmake_source_dir --strip-components=1 - echo "done." - fi - fi - elif [[ -d $cmake_exe ]]; then - cmake_source_dir="$cmake_exe" - cmake_binary_dir="$cmake_exe"-build - else - echo "FATAL ERROR: $cmake_exe is not a valid file/directory" - exit 1 - fi - - read -e -p "==> Please provide instalation location for \"cmake\": " tmp - eval tmp=$tmp - cmake_prefix=`readlink -f $tmp` - - echo "==> Configuring sources... " - cd $cmake_binary_dir - $cmake_source_dir/bootstrap --prefix=$cmake_prefix $cmake_qt_options - echo "==> Configuring sources... done." - - echo "==> Compiling sources..." - cd $cmake_binary_dir - make -j$number_of_threads - echo "==> Compiling sources... done." - - echo "==> Installing package..." - cd $cmake_binary_dir - make -j install - echo "==> Installing package... done." - cmake_exe=$cmake_binary_dir/bin/cmake -fi -cmake_version=`$cmake_exe --version | grep version | sed 's/cmake\ version\ //g'` - -if version_gt $cmake_min_version $cmake_version; then - echo "FATAL ERROR: your cmake version is $cmake_version, but needed version should be at least $cmake_min_version" -fi - -## =============== -## == Build VTK == -## =============== - -cont=true -vtk_sources="" -while [ $cont == true ]; do - if [ -z "$vtk_sources" ]; then - read -e -p "Please provide a valid location for VTK: " tmp - eval tmp=$tmp - vtk_sources=`readlink -f $tmp` - fi - read -p "I am going to use \"$vtk_sources\". Is this ok? [y/N] " -n 1 -r - echo - if [[ $REPLY =~ ^[Nn]$ ]]; then - vtk_sources="" - else - cont=false - fi -done -if [ -z $vtk_sources ]; then - echo "FATAL ERROR: VTK is really needed to build cpPlugins." - exit 1 -fi - -echo "Now, I will try to compile VTK..." -vtk_mime=`file -bzk --mime-type $vtk_sources` -if [[ -f $vtk_sources ]]; then - if [ "$vtk_mime" == "application/x-tar" ]; then - sub_mime=`file -b --mime-type $vtk_sources` - if [ $sub_mime == "application/gzip" ]; then - vtk_source_dir=`dirname $vtk_sources`/`basename $vtk_sources .tar.gz` - vtk_binary_dir=`dirname $vtk_sources`/`basename $vtk_sources .tar.gz`-build - echo -n "==> Extracting VTK sources... " - rm -rf $vtk_source_dir $vtk_binary_dir - mkdir -p $vtk_source_dir $vtk_binary_dir - tar xzf $vtk_sources -C $vtk_source_dir --strip-components=1 - echo "done." - fi - fi -elif [[ -d $vtk_sources ]]; then - vtk_source_dir="$vtk_sources" - vtk_binary_dir="$vtk_sources"-build -else - echo "FATAL ERROR: $vtk_sources is not a valid file/directory" - exit 1 -fi - -read -e -p "==> Please provide instalation location for \"VTK\": " tmp -eval tmp=$tmp -vtk_prefix=`readlink -f $tmp` - -vtk_build_type=MinSizeRel - -echo "==> Configuring sources... " -cd $vtk_binary_dir -if [ -x "$qmake_exe" ]; then - $cmake_exe \ - -DCMAKE_CXX_FLAGS:STRING=-std=c++11 \ - -DBUILD_DOCUMENTATION:BOOL=OFF \ - -DBUILD_EXAMPLES:BOOL=OFF \ - -DBUILD_SHARED_LIBS:BOOL=ON \ - -DBUILD_TESTING:BOOL=OFF \ - -DQT_QMAKE_EXECUTABLE:PATH=$qmake_exe \ - -DCMAKE_BUILD_TYPE:STRING=$vtk_build_type \ - -DModule_vtkGUISupportQt:BOOL=ON \ - -DModule_vtkGUISupportQtOpenGL:BOOL=ON \ - -DModule_vtkGUISupportQtSQL:BOOL=OFF \ - -DModule_vtkGUISupportQtWebkit:BOOL=OFF \ - -DCMAKE_INSTALL_PREFIX:PATH=$vtk_prefix \ - $vtk_source_dir -else - $cmake_exe \ - -DCMAKE_CXX_FLAGS:STRING=-std=c++11 \ - -DBUILD_DOCUMENTATION:BOOL=OFF \ - -DBUILD_EXAMPLES:BOOL=OFF \ - -DBUILD_SHARED_LIBS:BOOL=ON \ - -DBUILD_TESTING:BOOL=OFF \ - -DCMAKE_BUILD_TYPE:STRING=$build_type \ - -DCMAKE_INSTALL_PREFIX:PATH=$vtk_prefix \ - $vtk_source_dir -fi -echo "==> Configuring sources... done." - -echo "==> Compiling sources..." -cd $vtk_binary_dir -make -j$number_of_threads -echo "==> Compiling sources... done." - -echo "==> Installing package..." -cd $vtk_binary_dir -make -j install -echo "==> Installing package... done." - -## =============== -## == Build ITK == -## =============== - -cont=true -itk_sources="" -while [ $cont == true ]; do - if [ -z "$itk_sources" ]; then - read -e -p "Please provide a valid location for ITK: " tmp - eval tmp=$tmp - itk_sources=`readlink -f $tmp` - fi - read -p "I am going to use \"$itk_sources\". Is this ok? [y/N] " -n 1 -r - echo - if [[ $REPLY =~ ^[Nn]$ ]]; then - itk_sources="" - else - cont=false - fi -done -if [ -z $itk_sources ]; then - echo "FATAL ERROR: ITK is really needed to build cpPlugins." - exit 1 -fi - -echo "Now, I will try to compile ITK..." -itk_mime=`file -bzk --mime-type $itk_sources` -if [[ -f $itk_sources ]]; then - if [ "$itk_mime" == "application/x-tar" ]; then - sub_mime=`file -b --mime-type $itk_sources` - if [ $sub_mime == "application/gzip" ]; then - itk_source_dir=`dirname $itk_sources`/`basename $itk_sources .tar.gz` - itk_binary_dir=`dirname $itk_sources`/`basename $itk_sources .tar.gz`-build - echo -n "==> Extracting ITK sources... " - rm -rf $itk_source_dir $itk_binary_dir - mkdir -p $itk_source_dir $itk_binary_dir - tar xzf $itk_sources -C $itk_source_dir --strip-components=1 - echo "done." - fi - fi -elif [[ -d $itk_sources ]]; then - itk_source_dir="$itk_sources" - itk_binary_dir="$itk_sources"-build -else - echo "FATAL ERROR: $itk_sources is not a valid file/directory" - exit 1 -fi - -read -e -p "==> Please provide instalation location for \"ITK\": " tmp -eval tmp=$tmp -itk_prefix=`readlink -f $tmp` - -itk_build_type=MinSizeRel - -echo "==> Configuring sources... " -cd $itk_binary_dir -$cmake_exe \ - -DCMAKE_CXX_FLAGS:STRING=-std=c++11 \ - -DBUILD_DOCUMENTATION:BOOL=OFF \ - -DBUILD_EXAMPLES:BOOL=OFF \ - -DBUILD_SHARED_LIBS:BOOL=ON \ - -DBUILD_TESTING:BOOL=OFF \ - -DCMAKE_BUILD_TYPE:STRING=$itk_build_type \ - -DModule_ITKReview:BOOL=ON \ - -DModule_ITKVtkGlue:BOOL=OFF \ - -DModule_ParabolicMorphology:BOOL=ON \ - -DCMAKE_INSTALL_PREFIX:PATH=$itk_prefix \ - $itk_source_dir -echo "==> Configuring sources... done." - -echo "==> Compiling sources..." -cd $itk_binary_dir -make -j$number_of_threads -echo "==> Compiling sources... done." - -echo "==> Installing package..." -cd $itk_binary_dir -make -j install -echo "==> Installing package... done." - -## eof - $RCSfile$ diff --git a/dependencies/dependencies.py b/dependencies/dependencies.py deleted file mode 100644 index c232380..0000000 --- a/dependencies/dependencies.py +++ /dev/null @@ -1,328 +0,0 @@ -import errno, glob, os, math, mimetypes, multiprocessing -import platform, readline, tarfile -from distutils import spawn - -## ------------------------ -## -- Create directories -- -## ------------------------ - -def create_dir( path ): - try: - os.makedirs(path) - except OSError as exception: - if exception.errno != errno.EEXIST: - raise - # yrt -# fed - -## ------------------------ -## -- Filename completer -- -## ------------------------ - -def filename_completer( text, state ): - return ( glob.glob( text + '*' ) + [ None ] )[ state ] -# fed - -def get_filepath( message ): - readline.set_completer_delims( ' \t\n;' ) - readline.parse_and_bind( "tab: complete" ) - readline.set_completer( filename_completer ) - return os.path.abspath( raw_input( message ) ) -# fed - -## ---------------- -## -- Find paths -- -## ---------------- - -def find_paths( locs, progs ): - paths = [] - for prog in progs: - for loc in locs: - path = spawn.find_executable( loc + "/" + prog ) - if path <> None: - paths.append( path ) - # rof - # rof - return paths -# def - -## ------------------------------ -## -- Extract compressed files -- -## ------------------------------ - -def extract( src ): - tar_gz_type = ( "application/x-tar", "gzip" ) - src_type = mimetypes.guess_type( src ) - print( "Extracting " + src + ": " ) - if src_type == tar_gz_type: - src_dir = os.path.splitext( src )[ 0 ] - src_file = tarfile.open( src, "r|gz" ) - src_file.extractall( src_dir ) - src_file.close( ) - #elif src_type == tar_bz2_type: - #elif src_type == zip_type: - #else: - # fi - print( " done!" ) - return src_dir - -## ------------------- -## -- Choose config -- -## ------------------- - -def choose_config( paths, name ): - print( "Please choose one configuration for " + name + ":" ) - for i in range( len( paths ) ): - print( "\t" + str( i ) + ": " + paths[ i ] ) - # rof - print( "\t" + str( len( paths ) + 0 ) + ": Give another installation." ) - print( "\t" + str( len( paths ) + 1 ) + ": Build from scratch." ) - opt = -1 - while opt == -1: - opt = int( raw_input( "\t---> " ) ) - if opt < 0 or opt > len( paths ) + 1: - qmake_opt = -1 - # fi - # elihw - return opt -# def - -## -------------------- -## -- Some variables -- -## -------------------- - -home_dir = os.environ[ "HOME" ] -process_count = str( multiprocessing.cpu_count( ) / 2 ) - -## ----------------------------------------------- -## -- qmake and cmake locations and executables -- -## ----------------------------------------------- - -locations = [] -qmake_progs = [] -cmake_progs = [] -if platform.system( ) == "Linux": - locations = [ - "/usr/bin", - "/usr/local/bin", - home_dir + "/bin", - home_dir + "/local/bin" - ] - qmake_progs = [ "qmake", "qmake-qt4" ] - cmake_progs = [ "cmake" ] -# fi -qmake_paths = find_paths( locations, qmake_progs ) -cmake_paths = find_paths( locations, cmake_progs ) - -qmake_opt = choose_config( qmake_paths, "Qt4" ) -qmake_src = None -if qmake_opt == len( qmake_paths ): - qmake_exec = get_filepath( "Choose your own Qt4 installation: " ) - while not os.path.isfile( qmake_exec ): - qmake_exec = get_filepath( "Choose your own Qt4 installation: " ) - # elihw -elif qmake_opt == len( qmake_paths ) + 1: - qmake_src = get_filepath( "Choose your own Qt4 source file: " ) - while not os.path.isfile( qmake_src ): - qmake_src = get_filepath( "Choose your own Qt4 source file: " ) - # elihw -else: - qmake_exec = qmake_paths[ qmake_opt ] -# fi - -cmake_opt = choose_config( cmake_paths, "CMake" ) -cmake_src = None -if cmake_opt == len( cmake_paths ): - cmake_exec = get_filepath( "Choose your own CMake installation: " ) - while not os.path.isfile( cmake_exec ): - cmake_exec = get_filepath( "Choose your own CMake installation: " ) - # elihw -elif cmake_opt == len( cmake_paths ) + 1: - cmake_src = get_filepath( "Choose your own CMake source file: " ) - while not os.path.isfile( cmake_src ): - cmake_src = get_filepath( "Choose your own CMake source file: " ) - # elihw -else: - cmake_exec = cmake_paths[ cmake_opt ] -# fi - -## ----------------------- -## -- ITK and VTK files -- -## ----------------------- - -itk_src = get_filepath( "Choose your own ITK source file: " ) -while not os.path.isfile( itk_src ): - itk_src = get_filepath( "Choose your own ITK source file: " ) -# elihw -itk_extra = raw_input( "Type an extra configurations for ITK:" ) - -vtk_src = get_filepath( "Choose your own VTK source file: " ) -while not os.path.isfile( vtk_src ): - vtk_src = get_filepath( "Choose your own VTK source file: " ) -# elihw -vtk_extra = raw_input( "Type an extra configurations for VTK:" ) - -## ------------------------ -## -- More configuration -- -## ------------------------ - -install_prefix = get_filepath( "Choose your installation prefix: " ) -build_type = raw_input( "Type your build type [(r)elease/(d)ebug]: " ) -build_type.lower( ) -qmake_full = "n" -if qmake_src <> None: - qmake_full = raw_input( "Would you like a full Qt4 install [y/n]? " ) - qmake_full.lower( ) -# fi -qmake_build_type = "release" -kitware_build_type = "MinSizeRel" -if build_type[ 0 ] == "d": - qmake_build_type = "debug" - kitware_build_type = "Debug" -# fi - -## ----------------- -## -- Compile Qt4 -- -## ----------------- - -if qmake_src <> None: - qmake_src_dir = extract( qmake_src ) - qmake_bin_dir = qmake_src_dir + "-build" - min_size = 999999 - qmake_configure = "" - for root, dirs, files in os.walk( qmake_src_dir ): - if "configure" in files: - path = os.path.join( root, "configure" ) - if min_size > len( path ): - min_size = len( path ) - qmake_configure = path - # fi - # fi - # rof - create_dir( qmake_bin_dir ) - - # particular_options=-no-framework - particular_options = "" - - command = "cd " + qmake_bin_dir + " && " - command += qmake_configure - command += " -prefix " + install_prefix - command += " -" + qmake_build_type - command += " -opensource -shared -fast -no-webkit -optimized-qmake" - command += " -confirm-license" - if qmake_full == "y": - command += " -no-phonon -no-phonon-backend -no-openvg" - command += " -nomake demos -nomake examples" - # fi - command += particular_options - command += " && make -j" + process_count - command += " && make -j install" - os.system( command ) - qmake_exec = find_paths( [ install_prefix ], [ "qmake" ] )[ 0 ] -# fi - -## ------------------- -## -- Compile CMake -- -## ------------------- - -if cmake_src <> None: - cmake_src_dir = extract( cmake_src ) - cmake_bin_dir = cmake_src_dir + "-build" - min_size = 999999 - cmake_configure = "" - for root, dirs, files in os.walk( cmake_src_dir ): - if "bootstrap" in files: - path = os.path.join( root, "bootstrap" ) - if min_size > len( path ): - min_size = len( path ) - cmake_configure = path - # fi - # fi - # rof - create_dir( cmake_bin_dir ) - - command = "cd " + cmake_bin_dir + " && " - command += cmake_configure - command += " --prefix " + install_prefix - command += " --qt-gui --qt-qmake=" + qmake_exec - command += " && make -j" + process_count - command += " && make -j install" - os.system( command ) - cmake_exec = find_paths( [ install_prefix ], [ "cmake" ] )[ 0 ] -# fi - -## ----------------- -## -- Compile ITK -- -## ----------------- - -itk_src_dir = extract( itk_src ) -itk_bin_dir = itk_src_dir + "-build" -min_size = 999999 -itk_configure = "" -for root, dirs, files in os.walk( itk_src_dir ): - if "CMakeLists.txt" in files: - path = os.path.join( root, "CMakeLists.txt" ) - if min_size > len( path ): - min_size = len( path ) - itk_configure = path - # fi - # fi -# rof -create_dir( itk_bin_dir ) - -command = "cd " + itk_bin_dir + " && " -command += cmake_exec -command += " -DCMAKE_CXX_FLAGS:STRING=-std=c++11" -command += " -DBUILD_DOCUMENTATION:BOOL=OFF" -command += " -DBUILD_EXAMPLES:BOOL=OFF" -command += " -DBUILD_SHARED_LIBS:BOOL=ON" -command += " -DBUILD_TESTING:BOOL=OFF" -command += " -DModule_ITKReview:BOOL=ON" -command += " -DModule_ITKVtkGlue:BOOL=OFF" -command += " -DModule_ParabolicMorphology:BOOL=ON" -command += " -DCMAKE_BUILD_TYPE:STRING=" + kitware_build_type -command += " -DCMAKE_INSTALL_PREFIX:PATH=" + install_prefix -command += " " + itk_src_dir -command += " && make -j" + process_count -command += " && make -j install" -os.system( command ) - -## ----------------- -## -- Compile VTK -- -## ----------------- - -vtk_src_dir = extract( vtk_src ) -vtk_bin_dir = vtk_src_dir + "-build" -min_size = 999999 -vtk_configure = "" -for root, dirs, files in os.walk( vtk_src_dir ): - if "CMakeLists.txt" in files: - path = os.path.join( root, "CMakeLists.txt" ) - if min_size > len( path ): - min_size = len( path ) - vtk_configure = path - # fi - # fi -# rof -create_dir( vtk_bin_dir ) - -command = "cd " + vtk_bin_dir + " && " -command += cmake_exec -command += " -DCMAKE_CXX_FLAGS:STRING=-std=c++11" -command += " -DBUILD_DOCUMENTATION:BOOL=OFF" -command += " -DBUILD_EXAMPLES:BOOL=OFF" -command += " -DBUILD_SHARED_LIBS:BOOL=ON" -command += " -DBUILD_TESTING:BOOL=OFF" -command += " -DModule_vtkGUISupportQt:BOOL=ON" -command += " -DModule_vtkGUISupportQtOpenGL:BOOL=ON" -command += " -DModule_vtkGUISupportQtSQL:BOOL=OFF" -command += " -DModule_vtkGUISupportQtWebkit:BOOL=OFF" -command += " -DQT_QMAKE_EXECUTABLE:PATH=" + qmake_exec -command += " -DCMAKE_BUILD_TYPE:STRING=" + kitware_build_type -command += " -DCMAKE_INSTALL_PREFIX:PATH=" + install_prefix -command += " " + vtk_src_dir -command += " && make -j" + process_count -command += " && make -j install" -os.system( command ) - -## eof - $RCSfile$ diff --git a/dependencies/qt-4.8.6_MAC.patch b/dependencies/qt-4.8.6_MAC.patch deleted file mode 100644 index f0d2122..0000000 --- a/dependencies/qt-4.8.6_MAC.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- src/gui/painting/qpaintengine_mac.cpp.orig 2015-05-07 14:14:43.000000000 +0000 -+++ src/gui/painting/qpaintengine_mac.cpp -@@ -340,13 +340,7 @@ CGColorSpaceRef QCoreGraphicsPaintEngine - } - - // Get the color space from the display profile. -- CGColorSpaceRef colorSpace = 0; -- CMProfileRef displayProfile = 0; -- CMError err = CMGetProfileByAVID((CMDisplayIDType)displayID, &displayProfile); -- if (err == noErr) { -- colorSpace = CGColorSpaceCreateWithPlatformColorSpace(displayProfile); -- CMCloseProfile(displayProfile); -- } -+ CGColorSpaceRef colorSpace = CGDisplayCopyColorSpace(displayID); - - // Fallback: use generic DeviceRGB - if (colorSpace == 0) - diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt new file mode 100644 index 0000000..ea336d6 --- /dev/null +++ b/docs/CMakeLists.txt @@ -0,0 +1,33 @@ +## ========================================================================= +## @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) +## ========================================================================= + +option(cpPlugins_BUILD_DOC "Build documentation?" OFF) +if(cpPlugins_BUILD_DOC) + + ## == Doxygen and DOT? + find_package(Doxygen) + if(DOXYGEN_FOUND AND DOXYGEN_DOT_FOUND) + + ## == Configure files + set(_dox_in ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in) + set(_dox_out ${PROJECT_BINARY_DIR}/Doxyfile) + configure_file(${_dox_in} ${_dox_out} @ONLY) + + # == Execute doxygen + add_custom_target( + documentation ALL + COMMAND ${DOXYGEN_EXECUTABLE} ${_dox_out} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMENT "Generating documentation with Doxygen" + VERBATIM + ) + else(DOXYGEN_FOUND AND DOXYGEN_DOT_FOUND) + message( + STATUS + "*** Doxygen and Graphviz/Dot neede to build documentation ***" + ) + endif(DOXYGEN_FOUND AND DOXYGEN_DOT_FOUND) +endif(cpPlugins_BUILD_DOC) + +## eof - $RCSfile$ diff --git a/docs/Doxyfile.in b/docs/Doxyfile.in new file mode 100644 index 0000000..7e28ec1 --- /dev/null +++ b/docs/Doxyfile.in @@ -0,0 +1,2498 @@ +## ========================================================================= +## @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) +## ========================================================================= + +# Doxyfile 1.8.13 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all text +# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = cpPlugins + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = @prj_MAJ@.@prj_MIN@.@prj_REL@ + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = "Plugins system to simplify use of data-processing/visualization libraries like ITK and/or VTK." + +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@ + +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = YES + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = @PROJECT_SOURCE_DIR@/lib + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = @PROJECT_SOURCE_DIR@/lib + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = YES + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: +# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: +# Fortran. In the later case the parser tries to guess whether the code is fixed +# or free formatted code, this is the default for Fortran type files), VHDL. For +# instance to make doxygen treat .inc files as Fortran files (default is PHP), +# and .f files as C (default is Fortran), use: inc=Fortran f=C. +# +# Note: For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up +# to that level are automatically included in the table of contents, even if +# they do not have an id attribute. +# Note: This feature currently applies only to Markdown headings. +# Minimum value: 0, maximum value: 99, default value: 0. +# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. + +TOC_INCLUDE_HEADINGS = 0 + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# If one adds a struct or class to a group and this option is enabled, then also +# any nested class or struct is added to the same group. By default this option +# is disabled and one has to add nested compounds explicitly via \ingroup. +# The default value is: NO. + +GROUP_NESTED_COMPOUNDS = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = NO + +# This flag is only useful for Objective-C code. If set to YES, local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO, only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO, these classes will be included in the various overviews. This option +# has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) declarations. If set to NO, these declarations will be +# included in the documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO, these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES, upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. +# The default value is: system dependent. + +CASE_SENSE_NAMES = NO + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES, the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = YES + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. +# The default value is: YES. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. +# The default value is: YES. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES, the +# list will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. See also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO, doxygen will only warn about wrong or incomplete +# parameter documentation, but not about the absence of documentation. +# The default value is: NO. + +WARN_NO_PARAMDOC = NO + +# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when +# a warning is encountered. +# The default value is: NO. + +WARN_AS_ERROR = NO + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING +# Note: If this tag is empty the current directory is searched. + +INPUT = @PROJECT_SOURCE_DIR@/lib/cpPlugins @PROJECT_SOURCE_DIR@/lib/cpPluginsBase + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# possible encodings. +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# read by doxygen. +# +# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, +# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, +# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, +# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, +# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf. + +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cpp \ + *.c++ \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.idl \ + *.ddl \ + *.odl \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.cs \ + *.d \ + *.php \ + *.php4 \ + *.php5 \ + *.phtml \ + *.inc \ + *.m \ + *.markdown \ + *.md \ + *.mm \ + *.dox \ + *.py \ + *.pyw \ + *.f90 \ + *.f95 \ + *.f03 \ + *.f08 \ + *.f \ + *.for \ + *.tcl \ + *.vhd \ + *.vhdl \ + *.ucf \ + *.qsf + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = * + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# function all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = YES + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see http://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = YES + +# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the +# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the +# cost of reduced performance. This can be particularly helpful with template +# rich C++ code for which doxygen's built-in parser lacks the necessary type +# information. +# Note: The availability of this option depends on whether or not doxygen was +# generated with the -Duse-libclang=ON option for CMake. +# The default value is: NO. + +CLANG_ASSISTED_PARSING = NO + +# If clang assisted parsing is enabled you can provide the compiler with command +# line options that you would normally use when invoking the compiler. Note that +# the include paths will already be set by doxygen for the files and directories +# specified with INPUT and INCLUDE_PATH. +# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. + +CLANG_OPTIONS = + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = YES + +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# cascading style sheets that are included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefore more robust against future updates. +# Doxygen will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). For an example see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the style sheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting this +# to YES can help to show when doxygen was last run and thus if the +# documentation is up to date. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = NO + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: http://developer.apple.com/tools/xcode/), introduced with +# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler (hhc.exe). If non-empty, +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the master .chm file (NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated +# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# http://www.mathjax.org) which uses client side Javascript for the rendering +# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from http://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /