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
David Youssefi
otb
Commits
ac35c7d8
Commit
ac35c7d8
authored
Jul 01, 2020
by
Cédric Traizet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG: Image should only have one band in metadata
parent
0df350d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
Modules/Core/ImageBase/include/otbImage.hxx
Modules/Core/ImageBase/include/otbImage.hxx
+2
-3
No files found.
Modules/Core/ImageBase/include/otbImage.hxx
View file @
ac35c7d8
...
...
@@ -111,11 +111,10 @@ void Image<TPixel, VImageDimension>::CopyInformation(const itk::DataObject* data
if
(
imc
!=
nullptr
)
{
const
auto
&
imd
=
imc
->
GetImageMetadata
();
if
(
imd
.
Bands
.
size
()
>
0
&&
imd
.
Bands
.
size
()
!=
this
->
GetNumberOfComponentsPerPixel
())
if
(
imd
.
Bands
.
size
()
>
0
&&
imd
.
Bands
.
size
()
!=
1
)
{
SetImageMetadata
(
ImageMetadata
(
imd
.
GeometryKeys
,
imd
.
NumericKeys
,
imd
.
StringKeys
,
imd
.
LUT1DKeys
,
imd
.
LUT2DKeys
,
imd
.
TimeKeys
,
imd
.
ExtraKeys
,
ImageMetadata
::
ImageMetadataBandsType
(
this
->
GetNumberOfComponentsPerPixel
())
));
imd
.
LUT2DKeys
,
imd
.
TimeKeys
,
imd
.
ExtraKeys
,
{}
));
}
else
{
...
...
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