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
Container Registry
Model registry
Operate
Environments
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
Antoine Belvire
otb
Commits
0bdf4135
Commit
0bdf4135
authored
9 years ago
by
Christophe Palmann
Browse files
Options
Downloads
Patches
Plain Diff
TEST:more suitable test for haa decom
parent
2553389f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Modules/Filtering/Polarimetry/test/CMakeLists.txt
+4
-1
4 additions, 1 deletion
Modules/Filtering/Polarimetry/test/CMakeLists.txt
Modules/Filtering/Polarimetry/test/otbReciprocalHAlphaImageFilter.cxx
+63
-18
63 additions, 18 deletions
...ering/Polarimetry/test/otbReciprocalHAlphaImageFilter.cxx
with
67 additions
and
19 deletions
Modules/Filtering/Polarimetry/test/CMakeLists.txt
+
4
−
1
View file @
0bdf4135
...
@@ -63,7 +63,10 @@ otb_add_test(NAME saTvReciprocalHAlphaImageFilter COMMAND otbPolarimetryTestDriv
...
@@ -63,7 +63,10 @@ otb_add_test(NAME saTvReciprocalHAlphaImageFilter COMMAND otbPolarimetryTestDriv
--compare-image
${
EPSILON_12
}
${
BASELINE
}
/saTvReciprocalHAlphaImageFilter.tif
--compare-image
${
EPSILON_12
}
${
BASELINE
}
/saTvReciprocalHAlphaImageFilter.tif
${
TEMP
}
/saTvReciprocalHAlphaImageFilter.tif
${
TEMP
}
/saTvReciprocalHAlphaImageFilter.tif
otbReciprocalHAlphaImageFilter
otbReciprocalHAlphaImageFilter
${
BASELINE
}
/saTvSinclairImageFilter_SinclairToReciprocalCoherency.tif
${
INPUTDATA
}
/RSAT_imagery_HH.tif
${
INPUTDATA
}
/RSAT_imagery_HV.tif
${
INPUTDATA
}
/RSAT_imagery_VV.tif
5
${
TEMP
}
/saTvReciprocalHAlphaImageFilter.tif
${
TEMP
}
/saTvReciprocalHAlphaImageFilter.tif
)
)
...
...
This diff is collapsed.
Click to expand it.
Modules/Filtering/Polarimetry/test/otbReciprocalHAlphaImageFilter.cxx
+
63
−
18
View file @
0bdf4135
...
@@ -24,35 +24,80 @@
...
@@ -24,35 +24,80 @@
#include
"otbImageFileReader.h"
#include
"otbImageFileReader.h"
#include
"otbImageFileWriter.h"
#include
"otbImageFileWriter.h"
#include
"otbReciprocalHAlphaImageFilter.h"
#include
"otbReciprocalHAlphaImageFilter.h"
#include
"itkMeanImageFilter.h"
#include
"otbPerBandVectorImageFilter.h"
#include
"otbSinclairReciprocalImageFilter.h"
#include
"otbSinclairToReciprocalCoherencyMatrixFunctor.h"
int
otbReciprocalHAlphaImageFilter
(
int
itkNotUsed
(
argc
),
char
*
argv
[])
int
otbReciprocalHAlphaImageFilter
(
int
itkNotUsed
(
argc
),
char
*
argv
[])
{
{
const
char
*
inputFilename
=
argv
[
1
];
const
char
*
inputFilenameHH
=
argv
[
1
];
const
char
*
outputFilename
=
argv
[
2
];
const
char
*
inputFilenameHV
=
argv
[
2
];
const
char
*
inputFilenameVV
=
argv
[
3
];
typedef
double
PixelType
;
int
size
=
atoi
(
argv
[
4
]);
typedef
std
::
complex
<
PixelType
>
InputPixelType
;
const
char
*
outputFilename
=
argv
[
5
];
const
unsigned
int
Dimension
=
2
;
typedef
otb
::
VectorImage
<
InputPixelType
,
Dimension
>
ImageType
;
typedef
std
::
complex
<
double
>
ComplexPixelType
;
typedef
otb
::
VectorImage
<
PixelType
,
Dimension
>
RealImageType
;
const
unsigned
int
Dimension
=
2
;
typedef
otb
::
ReciprocalHAlphaImageFilter
<
ImageType
,
RealImageType
>
FilterType
;
typedef
otb
::
ImageFileReader
<
ImageType
>
ReaderType
;
typedef
otb
::
ImageFileWriter
<
RealImageType
>
WriterType
;
ReaderType
::
Pointer
reader
=
ReaderType
::
New
();
typedef
otb
::
Image
<
ComplexPixelType
,
Dimension
>
ComplexImageType
;
typedef
otb
::
VectorImage
<
ComplexPixelType
,
Dimension
>
ComplexVectorImageType
;
typedef
otb
::
VectorImage
<
double
,
Dimension
>
RealVectorImageType
;
typedef
otb
::
ImageFileReader
<
ComplexImageType
>
ReaderType
;
typedef
otb
::
ImageFileWriter
<
RealVectorImageType
>
WriterType
;
typedef
otb
::
SinclairReciprocalImageFilter
<
ComplexImageType
,
ComplexImageType
,
ComplexImageType
,
ComplexVectorImageType
,
otb
::
Functor
::
SinclairToReciprocalCovarianceMatrixFunctor
<
ComplexImageType
::
PixelType
,
ComplexImageType
::
PixelType
,
ComplexImageType
::
PixelType
,
ComplexVectorImageType
::
PixelType
>
>
SinclaireToC3FilterType
;
typedef
itk
::
MeanImageFilter
<
ComplexImageType
,
ComplexImageType
>
MeanFilterType
;
typedef
otb
::
PerBandVectorImageFilter
<
ComplexVectorImageType
,
ComplexVectorImageType
,
MeanFilterType
>
PerBandMeanFilterType
;
typedef
otb
::
ReciprocalHAlphaImageFilter
<
ComplexVectorImageType
,
RealVectorImageType
>
HAlphaFilterType
;
ReaderType
::
Pointer
readerHH
=
ReaderType
::
New
();
ReaderType
::
Pointer
readerHV
=
ReaderType
::
New
();
ReaderType
::
Pointer
readerVV
=
ReaderType
::
New
();
WriterType
::
Pointer
writer
=
WriterType
::
New
();
WriterType
::
Pointer
writer
=
WriterType
::
New
();
reader
->
SetFileName
(
inputFilename
);
SinclaireToC3FilterType
::
Pointer
sinclairtoc3
=
SinclaireToC3FilterType
::
New
();
PerBandMeanFilterType
::
Pointer
perBand
=
PerBandMeanFilterType
::
New
();
FilterType
::
Pointer
filter
=
FilterType
::
New
();
HAlphaFilterType
::
Pointer
haafilter
=
HAlphaFilterType
::
New
();
filter
->
SetInput
(
reader
->
GetOutput
());
MeanFilterType
::
InputSizeType
radius
;
radius
.
Fill
(
size
);
perBand
->
GetFilter
()
->
SetRadius
(
radius
);
readerHH
->
SetFileName
(
inputFilenameHH
);
readerHV
->
SetFileName
(
inputFilenameHV
);
readerVV
->
SetFileName
(
inputFilenameVV
);
sinclairtoc3
->
SetInputHH
(
readerHH
->
GetOutput
());
sinclairtoc3
->
SetInputHV_VH
(
readerHV
->
GetOutput
());
sinclairtoc3
->
SetInputVV
(
readerVV
->
GetOutput
());
perBand
->
SetInput
(
sinclairtoc3
->
GetOutput
());
haafilter
->
SetInput
(
perBand
->
GetOutput
());
writer
->
SetFileName
(
outputFilename
);
writer
->
SetFileName
(
outputFilename
);
writer
->
SetInput
(
filter
->
GetOutput
());
writer
->
SetInput
(
haa
filter
->
GetOutput
());
writer
->
Update
();
writer
->
Update
();
return
EXIT_SUCCESS
;
return
EXIT_SUCCESS
;
...
...
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