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
David Youssefi
otb
Commits
f97c5315
Commit
f97c5315
authored
16 years ago
by
Julien Michel
Browse files
Options
Downloads
Patches
Plain Diff
ENH: Fixing the pixel description to display all values
parent
113ad91e
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/Visualization/otbPixelDescriptionView.txx
+2
-0
2 additions, 0 deletions
Code/Visualization/otbPixelDescriptionView.txx
Code/Visualization/otbStandardRenderingFunction.h
+47
-4
47 additions, 4 deletions
Code/Visualization/otbStandardRenderingFunction.h
with
49 additions
and
4 deletions
Code/Visualization/otbPixelDescriptionView.txx
+
2
−
0
View file @
f97c5315
...
@@ -28,6 +28,8 @@ PixelDescriptionView<TInputPixelDescription>
...
@@ -28,6 +28,8 @@ PixelDescriptionView<TInputPixelDescription>
{
{
// build a widget with a default size
// build a widget with a default size
m_PixelDescriptionWidget = new Fl_Multiline_Output(0,0,200,40);
m_PixelDescriptionWidget = new Fl_Multiline_Output(0,0,200,40);
m_PixelDescriptionWidget->textsize(10);
m_PixelDescriptionWidget->textfont(FL_SCREEN);
m_PixelDescriptionWidget->deactivate();
m_PixelDescriptionWidget->deactivate();
}
}
...
...
This diff is collapsed.
Click to expand it.
Code/Visualization/otbStandardRenderingFunction.h
+
47
−
4
View file @
f97c5315
...
@@ -113,11 +113,54 @@ public:
...
@@ -113,11 +113,54 @@ public:
{
{
itk
::
OStringStream
oss
;
itk
::
OStringStream
oss
;
OutputPixelType
output
=
this
->
Evaluate
(
vpixel
);
OutputPixelType
output
=
this
->
Evaluate
(
vpixel
);
oss
<<
"R[chan="
<<
m_RedChannelIndex
<<
" val="
<<
static_cast
<
typename
itk
::
NumericTraits
<
ScalarPixelType
>::
PrintType
>
(
vpixel
[
m_RedChannelIndex
])
<<
" disp="
<<
static_cast
<
unsigned
int
>
(
output
[
0
])
<<
"]
\n
"
;
oss
<<
"G[chan="
<<
m_GreenChannelIndex
<<
" val="
<<
static_cast
<
typename
itk
::
NumericTraits
<
ScalarPixelType
>::
PrintType
>
(
vpixel
[
m_GreenChannelIndex
])
<<
" disp="
<<
static_cast
<
unsigned
int
>
(
output
[
1
])
<<
"]
\n
"
;
oss
<<
"B[chan="
<<
m_BlueChannelIndex
<<
" val="
<<
static_cast
<
typename
itk
::
NumericTraits
<
ScalarPixelType
>::
PrintType
>
(
vpixel
[
m_BlueChannelIndex
])
<<
" disp="
<<
static_cast
<
unsigned
int
>
(
output
[
2
])
<<
"]"
;
return
oss
.
str
();
for
(
unsigned
int
channel
=
0
;
channel
<
vpixel
.
Size
();
++
channel
)
{
if
(
channel
==
m_RedChannelIndex
)
{
oss
<<
"c= "
<<
channel
<<
", R= "
<<
(
int
)
output
[
0
];
if
(
output
[
0
]
<
100
)
{
oss
<<
" "
;
}
if
(
output
[
0
]
<
10
)
{
oss
<<
" "
;
}
oss
<<
", v= "
<<
static_cast
<
typename
itk
::
NumericTraits
<
ScalarPixelType
>::
PrintType
>
(
vpixel
[
channel
])
<<
std
::
endl
;
}
else
if
(
channel
==
m_BlueChannelIndex
)
{
oss
<<
"c= "
<<
channel
<<
", G= "
<<
(
int
)
output
[
1
];
if
(
output
[
1
]
<
100
)
{
oss
<<
" "
;
}
if
(
output
[
1
]
<
10
)
{
oss
<<
" "
;
}
oss
<<
", v= "
<<
static_cast
<
typename
itk
::
NumericTraits
<
ScalarPixelType
>::
PrintType
>
(
vpixel
[
channel
])
<<
std
::
endl
;
}
else
if
(
channel
==
m_GreenChannelIndex
)
{
oss
<<
"c= "
<<
channel
<<
", B= "
<<
(
int
)
output
[
2
];
if
(
output
[
2
]
<
100
)
{
oss
<<
" "
;
}
if
(
output
[
2
]
<
10
)
{
oss
<<
" "
;
}
oss
<<
", v= "
<<
static_cast
<
typename
itk
::
NumericTraits
<
ScalarPixelType
>::
PrintType
>
(
vpixel
[
channel
])
<<
std
::
endl
;
}
else
{
oss
<<
"c= "
<<
channel
<<
", v= "
<<
static_cast
<
typename
itk
::
NumericTraits
<
ScalarPixelType
>::
PrintType
>
(
vpixel
[
channel
])
<<
std
::
endl
;
}
}
return
oss
.
str
();
}
}
/** Get the transfer function for tuning */
/** Get the transfer function for tuning */
...
...
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