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 Cabieces
otb
Commits
4eec822d
Commit
4eec822d
authored
12 years ago
by
Mickael Savinaud
Browse files
Options
Downloads
Patches
Plain Diff
ENH: add information about overviews into the JPEG2000ImageIO
parent
7d63cc96
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/IO/otbJPEG2000ImageIO.cxx
+12
-1
12 additions, 1 deletion
Code/IO/otbJPEG2000ImageIO.cxx
Code/IO/otbJPEG2000ImageIO.h
+10
-1
10 additions, 1 deletion
Code/IO/otbJPEG2000ImageIO.h
with
22 additions
and
2 deletions
Code/IO/otbJPEG2000ImageIO.cxx
+
12
−
1
View file @
4eec822d
...
@@ -853,7 +853,6 @@ bool JPEG2000ImageIO::GetResolutionInfo(std::vector<unsigned int>& res, std::vec
...
@@ -853,7 +853,6 @@ bool JPEG2000ImageIO::GetResolutionInfo(std::vector<unsigned int>& res, std::vec
return
true
;
return
true
;
}
}
/** Get all resolution in jpeg2000 file */
bool
JPEG2000ImageIO
::
GetAvailableResolutions
(
std
::
vector
<
unsigned
int
>&
res
)
bool
JPEG2000ImageIO
::
GetAvailableResolutions
(
std
::
vector
<
unsigned
int
>&
res
)
{
{
res
=
this
->
m_InternalReaders
[
0
]
->
GetAvailableResolutions
();
res
=
this
->
m_InternalReaders
[
0
]
->
GetAvailableResolutions
();
...
@@ -864,6 +863,18 @@ bool JPEG2000ImageIO::GetAvailableResolutions(std::vector<unsigned int>& res)
...
@@ -864,6 +863,18 @@ bool JPEG2000ImageIO::GetAvailableResolutions(std::vector<unsigned int>& res)
return
true
;
return
true
;
}
}
unsigned
int
JPEG2000ImageIO
::
GetNumberOfOverviews
()
{
std
::
vector
<
unsigned
int
>
tempResList
=
this
->
m_InternalReaders
[
0
]
->
GetAvailableResolutions
();
if
(
tempResList
.
empty
())
{
itkExceptionMacro
(
<<
"Available resolutions in JPEG2000 is empty"
);
}
return
tempResList
.
size
()
-
1
;
}
// Read image
// Read image
void
JPEG2000ImageIO
::
Read
(
void
*
buffer
)
void
JPEG2000ImageIO
::
Read
(
void
*
buffer
)
...
...
This diff is collapsed.
Click to expand it.
Code/IO/otbJPEG2000ImageIO.h
+
10
−
1
View file @
4eec822d
...
@@ -70,9 +70,15 @@ public:
...
@@ -70,9 +70,15 @@ public:
/** Get Info about all resolution in jpeg2000 file */
/** Get Info about all resolution in jpeg2000 file */
bool
GetResolutionInfo
(
std
::
vector
<
unsigned
int
>&
res
,
std
::
vector
<
std
::
string
>&
desc
);
bool
GetResolutionInfo
(
std
::
vector
<
unsigned
int
>&
res
,
std
::
vector
<
std
::
string
>&
desc
);
/** Get all resolutions in jpeg2000 file */
/** Get all resolution in jpeg2000 file from res = 0 which is the full resolution
* to nbReslution-1 which is most degraded*/
bool
GetAvailableResolutions
(
std
::
vector
<
unsigned
int
>&
res
);
bool
GetAvailableResolutions
(
std
::
vector
<
unsigned
int
>&
res
);
/** Get number of available overviews in the jpeg2000 file
* ( if return = 0 => no overviews available because only one resolution
* is encoded in the file) */
unsigned
int
GetNumberOfOverviews
();
/** Reads the data from disk into the memory buffer provided. */
/** Reads the data from disk into the memory buffer provided. */
virtual
void
Read
(
void
*
buffer
);
virtual
void
Read
(
void
*
buffer
);
...
@@ -136,6 +142,9 @@ private:
...
@@ -136,6 +142,9 @@ private:
/** Resolution factor*/
/** Resolution factor*/
unsigned
int
m_ResolutionFactor
;
unsigned
int
m_ResolutionFactor
;
/** */
unsigned
int
m_NumberOfOverviews
;
/** Size of the cache used to reduce number of decoding operations*/
/** Size of the cache used to reduce number of decoding operations*/
unsigned
int
m_CacheSizeInByte
;
unsigned
int
m_CacheSizeInByte
;
...
...
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