Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Main Repositories
otb
Commits
c65178cb
Commit
c65178cb
authored
Oct 22, 2013
by
Jonathan Guinet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ENH: nbcomp is automatically set to image numberOfComponents if excedd JIRA OTB#296.
parent
1821fd61
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
Applications/FeatureExtraction/otbDimensionalityReduction.cxx
...ications/FeatureExtraction/otbDimensionalityReduction.cxx
+15
-0
No files found.
Applications/FeatureExtraction/otbDimensionalityReduction.cxx
View file @
c65178cb
...
...
@@ -180,6 +180,21 @@ private:
void
DoUpdateParameters
()
{
if
(
HasValue
(
"in"
))
{
FloatVectorImageType
::
Pointer
inImage
=
this
->
GetParameterImage
<
FloatVectorImageType
>
(
"in"
);
inImage
->
UpdateOutputInformation
();
// Update the values of the channels to be selected
unsigned
int
nbComponents
=
inImage
->
GetNumberOfComponentsPerPixel
();
unsigned
int
nbComp
=
static_cast
<
unsigned
int
>
(
GetParameterInt
(
"nbcomp"
));
if
(
nbComp
>
nbComponents
)
{
SetParameterInt
(
"nbcomp"
,
nbComponents
);
otbAppLogINFO
(
<<
"number of selected components can't exceed image dimension : "
<<
nbComponents
);
}
}
}
void
DoExecute
()
...
...
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