Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Cresson Remi
otbtf
Commits
6124fa79
Commit
6124fa79
authored
Oct 26, 2019
by
Cresson Remi
Browse files
ENH: new sample selection/extraction strategy (use nodata in selection or extraction)
parent
181e57de
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/otbPatchesSelection.cxx
View file @
6124fa79
...
...
@@ -545,7 +545,6 @@ public:
otbAppLogINFO
(
"Grid step : "
<<
this
->
GetParameterInt
(
"grid.step"
));
otbAppLogINFO
(
"Patch size : "
<<
this
->
GetParameterInt
(
"grid.psize"
));
// Compute no-data mask
m_NoDataFilter
=
IsNoDataFilterType
::
New
();
m_NoDataFilter
->
GetFunctor
().
SetNoDataValue
(
GetParameterFloat
(
"nodata"
));
...
...
@@ -556,6 +555,9 @@ public:
// If mask available, use it
if
(
HasValue
(
"mask"
))
{
if
(
GetParameterUInt8Image
(
"mask"
)
->
GetLargestPossibleRegion
().
GetSize
()
!=
GetParameterFloatVectorImage
(
"in"
)
->
GetLargestPossibleRegion
().
GetSize
())
otbAppLogFATAL
(
"Mask must have the same size as the input image!"
);
m_MaskImageFilter
=
MaskImageFilterType
::
New
();
m_MaskImageFilter
->
SetInput
(
m_NoDataFilter
->
GetOutput
());
m_MaskImageFilter
->
SetMaskImage
(
GetParameterUInt8Image
(
"mask"
));
...
...
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