Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
otb
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
211
Issues
211
List
Boards
Labels
Milestones
Merge Requests
9
Merge Requests
9
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Main Repositories
otb
Commits
baeffe2d
Commit
baeffe2d
authored
Mar 06, 2017
by
Ludovic Hussonnois
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
STYLE: Change include order add ignore some warning for shark.
parent
4f8f6e36
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
7 deletions
+44
-7
Modules/Learning/LearningBase/include/otbSharkUtils.h
Modules/Learning/LearningBase/include/otbSharkUtils.h
+5
-2
Modules/Learning/Supervised/include/otbSharkRandomForestsMachineLearningModel.h
...vised/include/otbSharkRandomForestsMachineLearningModel.h
+1
-2
Modules/Learning/Unsupervised/otb-module.cmake
Modules/Learning/Unsupervised/otb-module.cmake
+1
-0
Modules/Learning/Unsupervised/test/otbSharkUnsupervisedImageClassificationFilter.cxx
...ed/test/otbSharkUnsupervisedImageClassificationFilter.cxx
+3
-3
Modules/Learning/Unsupervised/test/otbTrainMachineLearningClusteringModel.cxx
...upervised/test/otbTrainMachineLearningClusteringModel.cxx
+17
-0
Modules/Learning/Unsupervised/test/otbUnsupervisedTestDriver.cxx
.../Learning/Unsupervised/test/otbUnsupervisedTestDriver.cxx
+17
-0
No files found.
Modules/Learning/LearningBase/include/otbSharkUtils.h
View file @
baeffe2d
...
...
@@ -18,14 +18,16 @@
#ifndef otbSharkUtils_h
#define otbSharkUtils_h
#i
nclude "otb_shark.h"
#i
fdef OTB_USE_SHARK
#include "itkMacro.h"
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wshadow"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
#include <shark/Data/Dataset.h>
#include "otb_shark.h"
#include "shark/Data/Dataset.h"
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic pop
#endif
...
...
@@ -120,6 +122,7 @@ template <class T> void ListSampleToSharkVector(const T * listSample, std::vecto
}
}
#endif //OTB_USE_SHARK
#endif
Modules/Learning/Supervised/include/otbSharkRandomForestsMachineLearningModel.h
View file @
baeffe2d
...
...
@@ -18,8 +18,6 @@
#ifndef otbSharkRandomForestsMachineLearningModel_h
#define otbSharkRandomForestsMachineLearningModel_h
#include "otb_shark.h"
#include "itkLightObject.h"
#include "otbMachineLearningModel.h"
...
...
@@ -33,6 +31,7 @@
#pragma GCC diagnostic ignored "-Wcast-align"
#pragma GCC diagnostic ignored "-Wunknown-pragmas"
#endif
#include "otb_shark.h"
#include "shark/Algorithms/Trainers/RFTrainer.h"
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic pop
...
...
Modules/Learning/Unsupervised/otb-module.cmake
View file @
baeffe2d
...
...
@@ -17,6 +17,7 @@ otb_module(OTBUnsupervised
OTBImageBase
OTBLearningBase
OTBSupervised
OTBShark
DESCRIPTION
"
${
DOCUMENTATION
}
"
...
...
Modules/Learning/Unsupervised/test/otbSharkUnsupervisedImageClassificationFilter.cxx
View file @
baeffe2d
...
...
@@ -51,15 +51,15 @@ void generateSamples(unsigned int num_classes, unsigned int num_samples,
LocalInputListSampleType
*
samples
,
LocalTargetListSampleType
*
labels
)
{
std
::
default_random_engine
generator
;
std
::
default_random_engine
randomEngine
;
std
::
uniform_int_distribution
<
int
>
label_distribution
(
1
,
num_classes
);
std
::
uniform_int_distribution
<
int
>
feat_distribution
(
0
,
256
);
for
(
size_t
scount
=
0
;
scount
<
num_samples
;
++
scount
)
{
LabeledPixelType
label
=
label_distribution
(
generator
);
LabeledPixelType
label
=
label_distribution
(
randomEngine
);
LocalInputSampleType
sample
(
num_features
);
for
(
unsigned
int
i
=
0
;
i
<
num_features
;
++
i
)
sample
[
i
]
=
feat_distribution
(
generator
);
sample
[
i
]
=
feat_distribution
(
randomEngine
);
samples
->
SetMeasurementVectorSize
(
num_features
);
samples
->
PushBack
(
sample
);
labels
->
PushBack
(
label
);
...
...
Modules/Learning/Unsupervised/test/otbTrainMachineLearningClusteringModel.cxx
View file @
baeffe2d
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#include <iostream>
#include <otbConfigure.h>
...
...
Modules/Learning/Unsupervised/test/otbUnsupervisedTestDriver.cxx
View file @
baeffe2d
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#include "otbTestMain.h"
void
RegisterTests
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment