Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julien Cabieces
otb
Commits
f4ad8b16
Commit
f4ad8b16
authored
6 years ago
by
Cédric Traizet
Browse files
Options
Downloads
Patches
Plain Diff
DOC: added documentation for the application
parent
7d9f82f9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Modules/Applications/AppHyperspectral/app/otbLocalRxDetection.cxx
+24
-24
24 additions, 24 deletions
...Applications/AppHyperspectral/app/otbLocalRxDetection.cxx
with
24 additions
and
24 deletions
Modules/Applications/AppHyperspectral/app/otbLocalRxDetection.cxx
+
24
−
24
View file @
f4ad8b16
...
...
@@ -22,7 +22,6 @@
#include
"otbWrapperApplicationFactory.h"
#include
"otbLocalRxDetectorFilter.h"
#include
"otbFunctorImageFilter.h"
namespace
otb
...
...
@@ -49,20 +48,27 @@ public:
typedef
DoubleImageType
ImageType
;
/** Filter typedefs */
typedef
otb
::
LocalRxDetectorFilter
<
VectorImageType
,
ImageType
>
LocalRxDetectorFilterType
;
typedef
otb
::
LocalRxDetectorFilter
<
VectorImageType
,
ImageType
>
LocalRxDetectorFilterType
;
//TODO remove this
private:
void
DoInit
()
override
{
SetName
(
"LocalRxDetection"
);
SetDescription
(
"
"
);
SetDescription
(
"
Performs local Rx score computation on an hyperspectral image.
"
);
// Documentation
SetDocName
(
"Local Rx Detection"
);
SetDocLongDescription
(
" "
);
SetDocLongDescription
(
"Performs local Rx score computation on an input "
"hyperspectral image. For each hyperspectral pixel, the Rx score is "
"computed using statistics computed on a dual neighborhood. The dual "
"neighborhood is composed of all pixel that are in between two radiuses "
"around the center pixel. This score can then be used to detect "
"anomalies in the image, this can be done for example by thresholding "
"the result of this application with the BandMath application."
);
SetDocLimitations
(
"None"
);
SetDocAuthors
(
"OTB-Team"
);
SetDocSeeAlso
(
"
"
);
SetDocSeeAlso
(
"
BandMath
"
);
AddDocTag
(
Tags
::
Hyperspectral
);
...
...
@@ -71,7 +77,7 @@ private:
AddParameter
(
ParameterType_OutputImage
,
"out"
,
"Output Image"
);
SetParameterDescription
(
"out"
,
"Output Rx score image"
);
MandatoryO
n
(
"out"
);
MandatoryO
ff
(
"out"
);
AddParameter
(
ParameterType_Int
,
"irx"
,
"X Internal radius"
);
SetParameterDescription
(
"irx"
,
"Internal radius in pixel along the X axis"
);
...
...
@@ -82,11 +88,11 @@ private:
SetDefaultParameterInt
(
"iry"
,
1
);
AddParameter
(
ParameterType_Int
,
"erx"
,
"X External radius"
);
SetParameterDescription
(
"erx"
,
"External radius in pixel"
);
SetParameterDescription
(
"erx"
,
"External radius in pixel
along the X axis
"
);
SetDefaultParameterInt
(
"erx"
,
3
);
AddParameter
(
ParameterType_Int
,
"ery"
,
"Y External radius"
);
SetParameterDescription
(
"ery"
,
"External radius in pixel"
);
SetParameterDescription
(
"ery"
,
"External radius in pixel
along the Y axis
"
);
SetDefaultParameterInt
(
"ery"
,
3
);
AddRAMParameter
();
...
...
@@ -94,6 +100,7 @@ private:
// Doc example parameter settings
SetDocExampleParameterValue
(
"in"
,
"cupriteSubHsi.tif"
);
SetDocExampleParameterValue
(
"out"
,
"LocalRxScore.tif"
);
SetDocExampleParameterValue
(
"threshold"
,
"0.5"
);
SetDocExampleParameterValue
(
"irx"
,
"1"
);
SetDocExampleParameterValue
(
"iry"
,
"1"
);
SetDocExampleParameterValue
(
"erx"
,
"3"
);
...
...
@@ -112,37 +119,30 @@ private:
auto
inputImage
=
GetParameterDoubleVectorImage
(
"in"
);
inputImage
->
UpdateOutputInformation
();
#if 0
auto
detecto
r = LocalRxDetectorFilterType::New();
auto
localRxDetectionFilte
r = LocalRxDetectorFilterType::New();
detecto
r->SetInput(inputImage);
localRxDetectionFilte
r->SetInput(inputImage);
// the radius are the same along x and y for the filter
unsigned int externalRadius = GetParameterInt("erx");
unsigned int internalRadius = GetParameterInt("irx");
detector->SetInternalRadius(internalRadius);
detector->SetExternalRadius(externalRadius);
//detector->Update();
SetParameterOutputImage("out", detector->GetOutput());
RegisterPipeline();
localRxDetectionFilter->SetInternalRadius(internalRadius);
localRxDetectionFilter->SetExternalRadius(externalRadius);
#else
localRxDetectionFunctor
<
double
>
detectorFunctor
;
detectorFunctor
.
SetInternalRadius
(
GetParameterInt
(
"irx"
),
GetParameterInt
(
"iry"
));
auto
localRxDetectionF
unctorF
ilter
=
otb
::
NewFunctorFilter
auto
localRxDetectionFilter
=
otb
::
NewFunctorFilter
(
detectorFunctor
,{{
GetParameterInt
(
"erx"
),
GetParameterInt
(
"ery"
)}});
localRxDetectionFunctorFilter
->
SetVariadicInputs
(
inputImage
);
localRxDetectionFilter
->
SetVariadicInputs
(
inputImage
);
#endif
SetParameterOutputImage
(
"out"
,
localRxDetectionF
unctorF
ilter
->
GetOutput
());
SetParameterOutputImage
(
"out"
,
localRxDetectionFilter
->
GetOutput
());
RegisterPipeline
();
#endif
}
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment