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 Osman
otb
Commits
4c7007df
Commit
4c7007df
authored
4 years ago
by
Cédric Traizet
Browse files
Options
Downloads
Patches
Plain Diff
BUG: complex images can have two times the number of bands in their metadata
parent
91d5a732
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Modules/IO/IOGDAL/src/otbGDALImageIO.cxx
+8
-5
8 additions, 5 deletions
Modules/IO/IOGDAL/src/otbGDALImageIO.cxx
with
8 additions
and
5 deletions
Modules/IO/IOGDAL/src/otbGDALImageIO.cxx
+
8
−
5
View file @
4c7007df
...
...
@@ -1306,12 +1306,15 @@ void GDALImageIO::InternalWriteImageInformation(const void* buffer)
}
m_Imd
.
Bands
=
bandRangeMetadata
;
}
std
::
cout
<<
m_Imd
<<
std
::
endl
;
if
(
!
m_Imd
.
Bands
.
empty
()
&&
(
std
::
size_t
)
m_NbBands
!=
m_Imd
.
Bands
.
size
())
{
itkExceptionMacro
(
<<
"Number of bands in metadata inconsistent with actual image."
);
}
// TODO : this should be a warning instead of an exception
// For complex pixels the number of bands is twice the number of compnents (in GDAL sense)
if
(
!
m_Imd
.
Bands
.
empty
()
&&
static_cast
<
std
::
size_t
>
(
m_NbBands
)
!=
m_Imd
.
Bands
.
size
()
&&
!
((
m_Imd
.
Bands
.
size
()
==
static_cast
<
std
::
size_t
>
(
2
*
m_NbBands
))
&&
this
->
GetPixelType
()
==
COMPLEX
))
{
itkExceptionMacro
(
<<
"Number of bands in metadata inconsistent with actual image."
);
}
if
((
m_Dimensions
[
0
]
==
0
)
&&
(
m_Dimensions
[
1
]
==
0
))
{
...
...
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