/**************************************************************************** Copyright (C) 2010-2012 the Office National des Forêts (ONF), France All rights reserved. Contact : alexandre.piboule@onf.fr Developers : Alexandre PIBOULE (ONF) This file is part of PluginONF library. PluginONF is free library: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. PluginONF is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with PluginONF. If not, see . *****************************************************************************/ #include "onf_steppluginmanager.h" #include "tools/ct_readerstools.h" #include "filter/onf_filterbyreturntype.h" #include "filter/onf_filterkeeplastreturninslice.h" #include "filter/onf_filterremoveupperoutliers.h" #include "filter/onf_filterbyintensity.h" #include "metric/onf_metricintensity.h" #include "metric/onf_metriclaspointcrown.h" #include "metric/onf_metricminmaxlasfields.h" #include "metric/onf_metricnapexmean.h" #include "metric/onf_metricnbylasclass.h" #include "metric/onf_metricpointcrownshape.h" #include "metric/onf_metricquantiles.h" #include "metric/onf_metricrastercrown.h" #include "metric/onf_metricrastercrown4.h" #include "metric/onf_metricrasterextend.h" #include "metric/onf_metricladbouvieretal2015.h" #include "metric/onf_metriccoverratio.h" #include "metric/onf_metricrastergaps.h" #include "metric/onf_metricrastercoverratio.h" #include "step/onf_stepaddfakecounter.h" #include "step/onf_stepaddlasdatatoplots.h" #include "step/onf_stepaddtilexyareas.h" #include "step/onf_stepadjustplotposition02.h" #include "step/onf_stepaffiliatepointalignementsandfieldinventory.h" #include "step/onf_stepapplydtmtocircle2d.h" #include "step/onf_stepchangeclusterthickness02.h" #include "step/onf_stepclassifyground.h" #include "step/onf_stepcompare3dgridscontents.h" #include "step/onf_stepcomputeattributemapfromclusters.h" #include "step/onf_stepcomputeboundaryv2.h" #include "step/onf_stepcomputechm.h" #include "step/onf_stepcomputeclustergrids.h" #include "step/onf_stepcomputecrownprojection.h" #include "step/onf_stepcomputecumulativeconvexhull.h" #include "step/onf_stepcomputecumulativenrtable.h" #include "step/onf_stepcomputecumulativesummary.h" #include "step/onf_stepcomputedominanceindicators.h" #include "step/onf_stepcomputedsm.h" #include "step/onf_stepcomputedtm.h" #include "step/onf_stepcomputeemptinessgrid.h" #include "step/onf_stepcomputegapmask.h" //#include "step/onf_stepcomputehillshaderaster.h" #include "step/onf_stepcomputehitgrid.h" #include "step/onf_stepcomputenestvolume.h" #include "step/onf_stepcomputeocclusionspace.h" #include "step/onf_stepcomputepointheightfromdtm.h" #include "step/onf_stepcomputepointheightfromtin.h" #include "step/onf_stepcomputerelativeintensityattribute.h" #include "step/onf_stepcomputescandirection.h" #include "step/onf_stepcomputesloperaster.h" #include "step/onf_stepcomputeroadprobabilityrasters.h" #include "step/onf_stepcomputestorktrajectory.h" #include "step/onf_stepcomputetin.h" #include "step/onf_stepcomputeverticalprofile.h" #include "step/onf_stepconvertdemtopoints.h" //#include "step/onf_stepconvertscenetocluster.h" #include "step/onf_stepconverttintodtm.h" #include "step/onf_stepcorrectalsprofile.h" #include "step/onf_stepcreatecolorcomposite.h" #include "step/onf_stepcreatemaximacloud.h" #include "step/onf_stepcreateplotmanagerfromfile.h" #include "step/onf_stepcreateplotmanagergrid.h" #include "step/onf_stepcreateplotsfromlist.h" #include "step/onf_stepcreatepointgrid.h" #include "step/onf_stepcreaterastermosaic.h" #include "step/onf_stepcreateseedgrid.h" #include "step/onf_stepcreatetiling.h" #include "step/onf_stepcumulativefilter.h" #include "step/onf_stepdetectsection07.h" #include "step/onf_stepdilateboolgrid.h" #include "step/onf_stepexportrastersintable.h" #include "step/onf_stepextractdiametersfromcylinders.h" #include "step/onf_stepextractlogbuffer.h" #include "step/onf_stepextractpointsforplots.h" #include "step/onf_stepextractpointsfromgrid.h" #include "step/onf_stepextractpositionsfromdensity.h" #include "step/onf_stepfilterclustersbysize.h" #include "step/onf_stepfilterelementsbyxyarea.h" #include "step/onf_stepfiltergridbycloud.h" #include "step/onf_stepfiltergridbyvalueandneighborhood.h" #include "step/onf_stepfiltergroupsbygroupsnumber.h" #include "step/onf_stepfilteritemsbyposition.h" #include "step/onf_stepfiltermaximabyclusterpositions.h" #include "step/onf_stepfiltermaximabyneighbourhood02.h" #include "step/onf_stepfilterpointsbyboolgrid.h" #include "step/onf_stepfilterwatershedbyradius.h" #include "step/onf_stepfilterwires.h" #include "step/onf_stepfitandfiltercylindersinsections.h" #include "step/onf_stepfitcirclesandfilter.h" #include "step/onf_stepfitcylinderoncluster.h" //#include "step/onf_stepfoldupcrown.h" #include "step/onf_stepimportsegmafilesformatching.h" #include "step/onf_stepinterpolatedem.h" #include "step/onf_stepkeepintersectingitems.h" #include "step/onf_steploadplotareas.h" #include "step/onf_steploadpositionsformatching.h" #include "step/onf_steploadtreemap.h" //#include "step/onf_stepmanualinventory.h" #include "step/onf_stepmatchclusterbygrids.h" #include "step/onf_stepmatchitemspositions.h" #include "step/onf_stepmergeclustersfrompositions02.h" #include "step/onf_stepmergeneighbourclustersingrid.h" #include "step/onf_stepmergeneighboursections04.h" #include "step/onf_stepmergeendtoendsections04.h" #include "step/onf_stepmergescenesbymodality.h" #include "step/onf_stepmodifydem.h" #include "step/onf_stepmodifypositions2d.h" //#include "step/onf_stepmodifyvoxelsegmentation.h" #include "step/onf_stepoptimizegaussianonmaximanumber.h" #include "step/onf_steppolygonfrommask.h" #include "step/onf_steprefpointfromarccenter.h" #include "step/onf_steprefpointfrombarycenter02.h" #include "step/onf_stepremoveuppernoise.h" #include "step/onf_stepremoveuppernoisev2.h" #include "step/onf_stepsegmentcrownsfromstemclusters.h" #include "step/onf_stepsegmentfromseedgrid.h" #include "step/onf_stepselectbboxbyfilename.h" //#include "step/onf_stepselectcellsingrid3d.h" #include "step/onf_stepselectcellsingrid3dbybinarypattern.h" #include "step/onf_stepselectclustersinlogs.h" #include "step/onf_stepselectgroupsbyreferenceheight.h" #include "step/onf_stepselectsceneforeachposition.h" //#include "step/onf_stepsetaffiliationidfromreference.h" #include "step/onf_stepsetfootcoordinatesvertically.h" #include "step/onf_stepsmoothdem.h" #include "step/onf_stepsmoothskeleton.h" #include "step/onf_stepstandardizeintensity.h" //#include "step/onf_stepvalidateinventory.h" #include "step/onf_stepvoxelclusterization.h" #include "step/onf_steploadbufferedrasters.h" #include "step/onf_stepcomputeglobalextent.h" #include "step/onf_stepbatchrastermerging.h" #include "step/onf_stepcomputegapsjmm.h" #include "step/onf_stepreducegroundpointdensity.h" #include "step/onf_stepremovehighgroundpoints.h" #include "step/onf_stepcomputerdm.h" #include "step/onf_stepcropraster.h" #include "step/onf_steprasterquantileresampling.h" #include "step/onf_stepcomputeprotectionforestmask.h" #include "step/onf_stepcomputepotentialstartarea.h" #include "step/onf_stepcomputepotentialstartzones.h" ONF_StepPluginManager::ONF_StepPluginManager() : CT_AbstractStepPlugin() { } ONF_StepPluginManager::~ONF_StepPluginManager() { } QString ONF_StepPluginManager::getPluginOfficialName() const { return "ONF"; } QString ONF_StepPluginManager::getPluginRISCitation() const { return "TY - COMP\n" "TI - Plugin ONF for Computree\n" "AU - Piboule, Alexandre\n" "PB - Office National des Forêts, Département RDI\n" "PY - 2022\n" "UR - https://computree.onf.fr/?page_id=1350\n" "ER - \n"; } bool ONF_StepPluginManager::init() { return CT_AbstractStepPlugin::init(); } bool ONF_StepPluginManager::loadGenericsStep() { addNewBetaStep(CT_StepsMenu::LP_Fit); addNewBetaStep(QObject::tr("Cigognes")); addNewBetaStep(QObject::tr("Cigognes")); addNewBetaStep(CT_StepsMenu::LP_Extract); addNewBetaStep(CT_StepsMenu::LP_Raster); addNewBetaStep(CT_StepsMenu::LP_Filter); addNewBetaStep(CT_StepsMenu::LP_Others); addNewBetaStep(CT_StepsMenu::LP_Others); addNewBetaStep(CT_StepsMenu::LP_Others); addNewBetaStep(CT_StepsMenu::LP_Stems); addNewBetaStep(CT_StepsMenu::LP_Crowns); addNewExportStep(CT_StepsMenu::LP_Raster); addNewGeometricalShapesStep(CT_StepsMenu::LP_Fit); addNewGeometricalShapesStep(CT_StepsMenu::LP_Create); addNewGeometricalShapesStep(CT_StepsMenu::LP_Create); addNewGeometricalShapesStep(CT_StepsMenu::LP_Create); addNewGeometricalShapesStep(CT_StepsMenu::LP_Create); addNewGeometricalShapesStep(CT_StepsMenu::LP_Create); addNewGeometricalShapesStep(CT_StepsMenu::LP_Filter); addNewGeometricalShapesStep(CT_StepsMenu::LP_Fit); addNewGeometricalShapesStep(CT_StepsMenu::LP_Fit); addNewGeometricalShapesStep(CT_StepsMenu::LP_Fit); //PLANTAGE COMPUTREE MODELS addNewGeometricalShapesStep(CT_StepsMenu::LP_Filter); addNewGeometricalShapesStep(QObject::tr("Détécter tiges (TLS, méthode ONF)")); addNewGeometricalShapesStep(QObject::tr("Détécter tiges (TLS, méthode ONF)")); addNewGeometricalShapesStep(QObject::tr("Détécter tiges (TLS, méthode ONF)")); addNewGeometricalShapesStep(QObject::tr("Détécter tiges (TLS, méthode ONF)")); addNewGeometricalShapesStep(QObject::tr("Détécter tiges (TLS, méthode ONF)")); addNewGeometricalShapesStep(QObject::tr("Détécter tiges (TLS, méthode ONF)")); addNewGeometricalShapesStep(QObject::tr("Détécter tiges (TLS, méthode ONF)")); addNewGeometricalShapesStep(QObject::tr("Détécter tiges (TLS, méthode ONF)")); addNewGeometricalShapesStep(QObject::tr("Détécter tiges (TLS, méthode ONF)")); addNewGeometricalShapesStep(QObject::tr("Détécter tiges (TLS, méthode ONF)")); addNewGeometricalShapesStep(QObject::tr("Détécter tiges (TLS, méthode ONF)")); addNewLoadStep(CT_StepsMenu::LP_Vector); addNewLoadStep(CT_StepsMenu::LP_Items); addNewLoadStep(CT_StepsMenu::LP_Raster); addNewMetricStep(CT_StepsMenu::LP_Analyze); addNewMetricStep(CT_StepsMenu::LP_Analyze); addNewMetricStep(CT_StepsMenu::LP_Analyze); addNewPointsStep(CT_StepsMenu::LP_Clusters); addNewPointsStep(CT_StepsMenu::LP_Classify); addNewPointsStep(CT_StepsMenu::LP_Create); addNewPointsStep(CT_StepsMenu::LP_Create); addNewPointsStep(CT_StepsMenu::LP_Create); addNewPointsStep(CT_StepsMenu::LP_Create); addNewPointsStep(CT_StepsMenu::LP_Create); addNewPointsStep(CT_StepsMenu::LP_Create); addNewPointsStep(CT_StepsMenu::LP_Analyze); // addNewPointsStep(CT_StepsMenu::LP_Transform); addNewPointsStep(CT_StepsMenu::LP_Analyze); addNewPointsStep(CT_StepsMenu::LP_Clusters); // addNewPointsStep(CT_StepsMenu::LP_Create); addNewBetaStep(CT_StepsMenu::LP_Filter); addNewPointsStep(CT_StepsMenu::LP_Filter); addNewPointsStep(CT_StepsMenu::LP_Filter); addNewPointsStep(CT_StepsMenu::LP_Create); addNewPointsStep(CT_StepsMenu::LP_Clusters); addNewPointsStep(CT_StepsMenu::LP_Filter); addNewPointsStep(CT_StepsMenu::LP_Filter); addNewRastersStep(CT_StepsMenu::LP_Create); addNewRastersStep(CT_StepsMenu::LP_Create); addNewRastersStep(CT_StepsMenu::LP_Create); addNewRastersStep(CT_StepsMenu::LP_Create); addNewRastersStep(CT_StepsMenu::LP_Transform); addNewRastersStep(CT_StepsMenu::LP_Transform); addNewRastersStep(CT_StepsMenu::LP_Create); addNewRastersStep(CT_StepsMenu::LP_Create); //addNewRastersStep(CT_StepsMenu::LP_Create); // doublon DTMTools addNewRastersStep(CT_StepsMenu::LP_Topography); addNewRastersStep(CT_StepsMenu::LP_Create); addNewRastersStep(CT_StepsMenu::LP_Create); addNewRastersStep(CT_StepsMenu::LP_Create); addNewRastersStep(CT_StepsMenu::LP_Create); addNewRastersStep(CT_StepsMenu::LP_Create); addNewRastersStep(CT_StepsMenu::LP_Transform); addNewRastersStep(CT_StepsMenu::LP_Transform); addNewRastersStep(CT_StepsMenu::LP_Transform); addNewRastersStep(CT_StepsMenu::LP_Transform); addNewRastersStep(CT_StepsMenu::LP_Transform); addNewRastersStep(CT_StepsMenu::LP_Transform); addNewRastersStep(CT_StepsMenu::LP_Create); addNewRastersStep(CT_StepsMenu::LP_Create); addNewRastersStep(CT_StepsMenu::LP_Transform); addNewRastersStep(CT_StepsMenu::LP_Transform); //addNewRastersStep(QObject::tr("Avalanches")); //addNewRastersStep(QObject::tr("Avalanches")); //addNewRastersStep(QObject::tr("Avalanches")); addNewShapes2DStep(CT_StepsMenu::LP_Footprints); addNewShapes2DStep(CT_StepsMenu::LP_Footprints); addNewShapes2DStep(CT_StepsMenu::LP_Footprints); addNewShapes2DStep(CT_StepsMenu::LP_Footprints); addNewShapes2DStep(CT_StepsMenu::LP_Footprints); addNewShapes2DStep(CT_StepsMenu::LP_Footprints); addNewShapes2DStep(CT_StepsMenu::LP_Footprints); addNewShapes2DStep(CT_StepsMenu::LP_Footprints); addNewShapes2DStep(CT_StepsMenu::LP_Footprints); addNewShapes2DStep(CT_StepsMenu::LP_Plots); addNewShapes2DStep(CT_StepsMenu::LP_Plots); addNewShapes2DStep(CT_StepsMenu::LP_Plots); addNewShapes2DStep(CT_StepsMenu::LP_Plots); addNewShapes2DStep(CT_StepsMenu::LP_Plots); addNewVoxelsStep(CT_StepsMenu::LP_Analyze); addNewVoxelsStep(CT_StepsMenu::LP_Create); addNewVoxelsStep(CT_StepsMenu::LP_Create); addNewVoxelsStep(CT_StepsMenu::LP_Filter); addNewVoxelsStep(CT_StepsMenu::LP_Filter); addNewVoxelsStep(CT_StepsMenu::LP_Filter); addNewVoxelsStep(CT_StepsMenu::LP_Filter); addNewVoxelsStep(CT_StepsMenu::LP_Filter); addNewVoxelsStep(CT_StepsMenu::LP_Create); addNewVoxelsStep(QObject::tr("Segmentation")); addNewVoxelsStep(QObject::tr("Segmentation")); addNewVoxelsStep(QObject::tr("Segmentation")); addNewVoxelsStep(QObject::tr("Segmentation")); // addNewVoxelsStep(QObject::tr("Segmentation")); // addNewVoxelsStep(CT_StepsMenu::LP_Filter); addNewVoxelsStep(CT_StepsMenu::LP_Filter); // addNewWorkflowStep(); //inutile // addNewWorkflowStep("Affiliations"); // etapes ne fonctionnant plus //addNewGeometricalShapesStep(CT_StepsMenu::LP_Stems); //addNewGeometricalShapesStep(CT_StepsMenu::LP_Stems); return true; } bool ONF_StepPluginManager::loadOpenFileStep() { return true; } bool ONF_StepPluginManager::loadCanBeAddedFirstStep() { return true; } bool ONF_StepPluginManager::loadFilters() { addNewFilter(new ONF_FilterByReturnType(getPluginOfficialName())); addNewFilter(new ONF_FilterRemoveUpperOutliers(getPluginOfficialName())); addNewFilter(new ONF_FilterKeepLastReturnInSlice(getPluginOfficialName())); addNewFilter(new ONF_FilterByIntensity(getPluginOfficialName())); return true; } bool ONF_StepPluginManager::loadMetrics() { addNewMetric(new ONF_MetricQuantiles(getPluginOfficialName())); addNewMetric(new ONF_MetricNApexMean(getPluginOfficialName())); addNewMetric(new ONF_MetricLASPointCrown(getPluginOfficialName())); addNewMetric(new ONF_MetricPointCrownShape(getPluginOfficialName())); addNewMetric(new ONF_MetricIntensity(getPluginOfficialName())); addNewMetric(new ONF_MetricLADBouvierEtAl2015(getPluginOfficialName())); addNewMetric(new ONF_MetricCoverRatio(getPluginOfficialName())); addNewMetric(new ONF_MetricRasterCrown(getPluginOfficialName())); addNewMetric(new ONF_MetricRasterCrown4(getPluginOfficialName())); addNewMetric(new ONF_MetricRasterExtend(getPluginOfficialName())); addNewMetric(new ONF_MetricNbyLASClass(getPluginOfficialName())); addNewMetric(new ONF_MetricMinMaxLASFields(getPluginOfficialName())); addNewMetric(new ONF_MetricRasterGaps(getPluginOfficialName())); addNewMetric(new ONF_MetricRasterCoverRatio(getPluginOfficialName())); return true; } bool ONF_StepPluginManager::loadItemDrawables() { return true; } bool ONF_StepPluginManager::loadActions() { return true; } bool ONF_StepPluginManager::loadExporters() { return true; } bool ONF_StepPluginManager::loadReaders() { return true; } void ONF_StepPluginManager::initReadersCollection() { CT_ReadersTools::initAvailableReaders(m_readersOfAllPlugins, nullptr); } CT_AbstractReader* ONF_StepPluginManager::readerAvailableByUniqueName(const QString &readerClassName) const { for(CT_AbstractReader* reader : m_readersOfAllPlugins) { if(reader->uniqueName() == readerClassName) return reader; } return nullptr; } const QList &ONF_StepPluginManager::readersAvailable() const { return m_readersOfAllPlugins; } bool ONF_StepPluginManager::loadAfterAllPluginsLoaded() { initReadersCollection(); return true; }