Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ImageINSA_Tanguy
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
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
Tanguy.Raufflet
ImageINSA_Tanguy
Commits
73fdbefb
Commit
73fdbefb
authored
10 years ago
by
Antoine Lorence
Browse files
Options
Downloads
Patches
Plain Diff
Fix some strings, doc and comments
parent
ae6ec459
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/Operations/DPCM.cpp
+4
-4
4 additions, 4 deletions
app/Operations/DPCM.cpp
app/Operations/DPCMDialog.ui
+1
-1
1 addition, 1 deletion
app/Operations/DPCMDialog.ui
app/Operations/DPCMEncodingOp.cpp
+5
-5
5 additions, 5 deletions
app/Operations/DPCMEncodingOp.cpp
with
10 additions
and
10 deletions
app/Operations/DPCM.cpp
+
4
−
4
View file @
73fdbefb
...
...
@@ -49,7 +49,7 @@ DPCM::~DPCM()
string
DPCM
::
execute
(
const
GrayscaleImage
*
im
,
Prediction
prediction_alg
,
imagein
::
ImageDouble
**
err_image
,
Image
**
recons_image
,
double
Q
)
{
char
buffer
[
255
];
if
(
quantdef
==
NULL
)
{
throw
"Error in
MICD
::execute:
\n
quantdef = NULL"
;
throw
"Error in
DPCM
::execute:
\n
quantdef = NULL"
;
}
string
returnval
;
int
imgHeight
,
imgWidth
,
pred
,
ier
,
ireco
,
icode
;
...
...
@@ -213,7 +213,7 @@ void DPCM::set_levels() {
// Fills in iloiqu with the specified values
if
(
quantdef
->
nbThresholds
()
>
N_MAX_THRESHOLD
||
quantdef
->
nbThresholds
()
<
1
)
{
char
buffer
[
255
];
sprintf
(
buffer
,
"Error in
MICD
::set_levels:
\n
quantdef->GetNumThresholds() = %d"
,
quantdef
->
nbThresholds
()
);
sprintf
(
buffer
,
"Error in
DPCM
::set_levels:
\n
quantdef->GetNumThresholds() = %d"
,
quantdef
->
nbThresholds
()
);
throw
buffer
;
}
int
counter
;
...
...
@@ -247,11 +247,11 @@ string DPCM::print_iloiqu() {
void
DPCM
::
setQuantification
(
Quantification
*
tquantdef
)
{
if
(
tquantdef
==
NULL
)
{
throw
"Error in
MICD
::setQuantDef:
\n
tquantdef = NULL"
;
throw
"Error in
DPCM
::setQuantDef:
\n
tquantdef = NULL"
;
}
if
(
tquantdef
->
nbThresholds
()
>
N_MAX_THRESHOLD
||
tquantdef
->
nbThresholds
()
<
1
)
{
char
buffer
[
255
];
sprintf
(
buffer
,
"Error in
MICD
::setQuantDef:
\n
tquantdef->GetNumThresholds() = %d"
,
tquantdef
->
nbThresholds
()
);
sprintf
(
buffer
,
"Error in
DPCM
::setQuantDef:
\n
tquantdef->GetNumThresholds() = %d"
,
tquantdef
->
nbThresholds
()
);
throw
buffer
;
}
quantdef
=
tquantdef
;
...
...
This diff is collapsed.
Click to expand it.
app/Operations/DPCMDialog.ui
+
1
−
1
View file @
73fdbefb
...
...
@@ -11,7 +11,7 @@
</rect>
</property>
<property
name=
"windowTitle"
>
<string>
MICD
encoding
</string>
<string>
DPCM
encoding
</string>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
>
<item
alignment=
"Qt::AlignHCenter"
>
...
...
This diff is collapsed.
Click to expand it.
app/Operations/DPCMEncodingOp.cpp
+
5
−
5
View file @
73fdbefb
...
...
@@ -29,7 +29,7 @@
using
namespace
std
;
using
namespace
imagein
;
DPCMEncodingOp
::
DPCMEncodingOp
()
:
Operation
(
qApp
->
translate
(
"Operations"
,
"
MICD
Encoding"
).
toStdString
())
DPCMEncodingOp
::
DPCMEncodingOp
()
:
Operation
(
qApp
->
translate
(
"Operations"
,
"
DPCM
Encoding"
).
toStdString
())
{
}
...
...
@@ -50,8 +50,8 @@ void DPCMEncodingOp::operator()(const imagein::Image* img, const std::map<const
micd
.
setQuantification
(
dialog
->
getQuantification
());
}
catch
(
const
char
*
str
)
{
QMessageBox
::
critical
(
NULL
,
qApp
->
translate
(
"
MICD
"
,
"Error while loading quantification file"
),
qApp
->
translate
(
"
MICD
"
,
"The specified quantification file could not be opened !"
));
QMessageBox
::
critical
(
NULL
,
qApp
->
translate
(
"
DPCM
"
,
"Error while loading quantification file"
),
qApp
->
translate
(
"
DPCM
"
,
"The specified quantification file could not be opened !"
));
return
;
}
GrayscaleImage
*
image
=
Converter
<
GrayscaleImage
>::
convert
(
*
img
);
...
...
@@ -59,6 +59,6 @@ void DPCMEncodingOp::operator()(const imagein::Image* img, const std::map<const
ImageDouble
*
errorImage
;
string
s
=
micd
.
execute
(
image
,
dialog
->
getPrediction
(),
&
errorImage
,
&
reconstructedImage
,
dialog
->
getQ
());
outText
(
s
);
outDoubleImage
(
errorImage
,
qApp
->
translate
(
"
MICD
"
,
"Error image"
).
toStdString
(),
true
,
true
,
0.1
,
false
);
outImage
(
reconstructedImage
,
qApp
->
translate
(
"
MICD
"
,
"Reconstructed image"
).
toStdString
());
outDoubleImage
(
errorImage
,
qApp
->
translate
(
"
DPCM
"
,
"Error image"
).
toStdString
(),
true
,
true
,
0.1
,
false
);
outImage
(
reconstructedImage
,
qApp
->
translate
(
"
DPCM
"
,
"Reconstructed image"
).
toStdString
());
}
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