From 73fdbefb8ec78da3b9d03d683b501379dfe7b8e7 Mon Sep 17 00:00:00 2001
From: Antoine Lorence <antoine.lorence@insa-rennes.fr>
Date: Tue, 9 Dec 2014 15:09:14 +0100
Subject: [PATCH] Fix some strings, doc and comments

---
 app/Operations/DPCM.cpp           |  8 ++++----
 app/Operations/DPCMDialog.ui      |  2 +-
 app/Operations/DPCMEncodingOp.cpp | 10 +++++-----
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/app/Operations/DPCM.cpp b/app/Operations/DPCM.cpp
index ee0f2a6..cc2f24d 100644
--- a/app/Operations/DPCM.cpp
+++ b/app/Operations/DPCM.cpp
@@ -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:\nquantdef = NULL";
+        throw "Error in DPCM::execute:\nquantdef = 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:\nquantdef->GetNumThresholds() = %d", quantdef->nbThresholds() );
+        sprintf( buffer, "Error in DPCM::set_levels:\nquantdef->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:\ntquantdef = NULL";
+        throw "Error in DPCM::setQuantDef:\ntquantdef = NULL";
     }
     if( tquantdef->nbThresholds() > N_MAX_THRESHOLD || tquantdef->nbThresholds() < 1 ) {
         char buffer[255];
-        sprintf( buffer, "Error in MICD::setQuantDef:\ntquantdef->GetNumThresholds() = %d", tquantdef->nbThresholds() );
+        sprintf( buffer, "Error in DPCM::setQuantDef:\ntquantdef->GetNumThresholds() = %d", tquantdef->nbThresholds() );
         throw buffer;
     }
     quantdef = tquantdef;
diff --git a/app/Operations/DPCMDialog.ui b/app/Operations/DPCMDialog.ui
index f2a37ce..331a6c4 100644
--- a/app/Operations/DPCMDialog.ui
+++ b/app/Operations/DPCMDialog.ui
@@ -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">
diff --git a/app/Operations/DPCMEncodingOp.cpp b/app/Operations/DPCMEncodingOp.cpp
index ef6a906..6e8292d 100644
--- a/app/Operations/DPCMEncodingOp.cpp
+++ b/app/Operations/DPCMEncodingOp.cpp
@@ -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());
 }
-- 
GitLab