Skip to content
Snippets Groups Projects
Commit 73fdbefb authored by Antoine Lorence's avatar Antoine Lorence
Browse files

Fix some strings, doc and comments

parent ae6ec459
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
......@@ -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">
......
......@@ -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());
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment