Olena-patches
Threads by month
- ----- 2025 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
July 2010
- 6 participants
- 122 discussions

16 Jul '10
* demo/viewer/browser_widget.cc,
* demo/viewer/browser_widget.hh: Add arrows to change image and keep
XML step.
* demo/viewer/key_widget.cc,
* demo/viewer/key_widget.hh: Change ListWidget to TreeWidget, Items can be
disabled/enabled in groups.
* demo/viewer/step_widget.cc,
* demo/viewer/step_widget.hh: Small changes to keep the step when next/prev.
picture is chosen.
* demo/viewer/viewer.cc,
* demo/viewer/xml_widget.cc: Layout adjustement.
---
scribo/ChangeLog | 20 ++++++
scribo/demo/viewer/browser_widget.cc | 56 +++++++++++++++--
scribo/demo/viewer/browser_widget.hh | 8 ++-
scribo/demo/viewer/key_widget.cc | 113 +++++++++++++++++++++++----------
scribo/demo/viewer/key_widget.hh | 12 +++-
scribo/demo/viewer/step_widget.cc | 38 +++++++++---
scribo/demo/viewer/step_widget.hh | 4 +-
scribo/demo/viewer/viewer.cc | 24 +++++---
scribo/demo/viewer/xml_widget.cc | 3 +-
9 files changed, 213 insertions(+), 65 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index d40a197..dbc16e3 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,5 +1,25 @@
2010-07-16 Arthur Crepin-Leblond <crepin(a)ptaouchnok.lrde.epita.fr>
+ Two new features in Qt interface.
+
+ * demo/viewer/browser_widget.cc,
+ * demo/viewer/browser_widget.hh: Add arrows to change image and keep
+ XML step.
+
+ * demo/viewer/key_widget.cc,
+ * demo/viewer/key_widget.hh: Change ListWidget to TreeWidget, Items can be
+ disabled/enabled in groups.
+
+ * demo/viewer/step_widget.cc,
+ * demo/viewer/step_widget.hh: Small changes to keep the step when next/prev.
+ picture is chosen.
+
+ * demo/viewer/viewer.cc,
+ * demo/viewer/xml_widget.cc: Layout adjustement.
+
+
+2010-07-16 Arthur Crepin-Leblond <crepin(a)ptaouchnok.lrde.epita.fr>
+
ChangeLog mistake.
* scribo/ChangeLog: Move 2010-07-08 entry in...
diff --git a/scribo/demo/viewer/browser_widget.cc b/scribo/demo/viewer/browser_widget.cc
index d69fea0..bd70648 100644
--- a/scribo/demo/viewer/browser_widget.cc
+++ b/scribo/demo/viewer/browser_widget.cc
@@ -17,16 +17,28 @@
BrowserWidget::BrowserWidget(QDirModel* files, QString dir)
: files_(files),
view_(new QListView()),
- path_(new QLineEdit(""))
+ path_(new QLineEdit("")),
+ first_time_(true)
{
+ QToolButton* next= new QToolButton();
+ QToolButton* prev= new QToolButton();
+ next->setArrowType(Qt::RightArrow);
+ prev->setArrowType(Qt::LeftArrow);
+
QLabel* title = new QLabel(tr("Images"));
title->setAlignment(Qt::AlignHCenter);
QVBoxLayout* layout = new QVBoxLayout;
- layout->addWidget(title);
+ QHBoxLayout *hlayout = new QHBoxLayout;
+
+ hlayout->addWidget(prev);
+ hlayout->addWidget(title);
+ hlayout->addWidget(next);
+ layout->addLayout(hlayout);
layout->addWidget(path_);
layout->addWidget(view_);
+ //setLayout(hlayout);
setLayout(layout);
view_->setModel(files);
@@ -34,19 +46,28 @@ BrowserWidget::BrowserWidget(QDirModel* files, QString dir)
| QDir::Readable | QDir::Drives);
view_->setRootIndex(files->index(QDir::currentPath()));
+
QDir d(dir);
if (d.isReadable())
view_->setRootIndex(files->index(d.absolutePath()));
+
view_->setRowHidden(0, true);
+
path_->setText(files->filePath(view_->rootIndex()));
+
connect(view_, SIGNAL(activated(const QModelIndex&)),
this, SLOT(activate(const QModelIndex&)));
+ connect(next, SIGNAL(released ()),
+ this, SLOT(next()));
+ connect(prev, SIGNAL(released ()),
+ this, SLOT(prev()));
connect(path_, SIGNAL(returnPressed()),
this, SLOT(path_return_pressed()));
QStringList files_filters;
files_filters << "*.png" << "*.jpg"
- << "*.tif" << "*.ppm" << "*.pgm" << "*.pbm";
+ << "*.tif" << "*.ppm" << "*.pgm" << "*.pbm" << "pnm";
+
files->setNameFilters(files_filters);
}
@@ -57,20 +78,43 @@ BrowserWidget::path_return_pressed()
QDir d(path);
if (d.isReadable())
- activate(files_->index(QString(path)));
+ activate(files_->index(QString(path)), false);
}
void
-BrowserWidget::activate(const QModelIndex& index)
+BrowserWidget::activate(const QModelIndex& index, bool b)
{
if (files_->isDir(index))
{
view_->setRootIndex(index);
view_->setRowHidden(0, true);
path_->setText(files_->filePath(view_->rootIndex()));
+ first_time_ = true;
return;
}
- emit activated(files_->filePath(index));
+
+ first_time_ = false;
+
+ emit activated(files_->filePath(index), b);
+}
+
+void
+BrowserWidget::change_pos(bool next)
+{
+ QModelIndex index = view_->currentIndex();
+
+ if(next)
+ index = files_->index(index.row() + 1, index.column(), index.parent());
+ else
+ index = files_->index(index.row() - 1, index.column(), index.parent());
+
+ if (index.isValid())
+ {
+ if (!files_->isDir(index))
+ if (!first_time_)
+ activate(index, true);
+ view_->setCurrentIndex(index);
+ }
}
BrowserWidget::~BrowserWidget()
diff --git a/scribo/demo/viewer/browser_widget.hh b/scribo/demo/viewer/browser_widget.hh
index 23930cd..a0fbe43 100644
--- a/scribo/demo/viewer/browser_widget.hh
+++ b/scribo/demo/viewer/browser_widget.hh
@@ -27,16 +27,20 @@ public:
~BrowserWidget();
public slots:
- void activate(const QModelIndex& index);
+ void activate(const QModelIndex& index, bool b = false);
void path_return_pressed();
+ void next() { change_pos(true); }
+ void prev() { change_pos(false); }
signals:
- void activated(QString filename);
+ void activated(QString filename, bool b);
private:
+ void change_pos(bool next);
QDirModel* files_;
QListView* view_;
QLineEdit* path_;
+ bool first_time_;
};
#endif /* !BROWSER_WIDGET_HH_ */
diff --git a/scribo/demo/viewer/key_widget.cc b/scribo/demo/viewer/key_widget.cc
index 5e371ab..47203c3 100644
--- a/scribo/demo/viewer/key_widget.cc
+++ b/scribo/demo/viewer/key_widget.cc
@@ -16,82 +16,127 @@
#include "common.hh"
KeyWidget::KeyWidget(const region::KeyMap& key_map)
- : items_(new QListWidget())
+ : items_(new QTreeWidget()),
+ text_(new QTreeWidgetItem(QStringList("Text"))),
+ regions_(new QTreeWidgetItem(QStringList("Regions")))
{
QLabel* title = new QLabel(tr("Key"));
title->setAlignment(Qt::AlignHCenter);
+ items_->addTopLevelItem(text_);
+ items_->addTopLevelItem(regions_);
+ items_->setHeaderHidden(true);
+
+ text_->setCheckState(0, Qt::Checked);
+ regions_->setCheckState(0, Qt::Checked);
+ regions_->setExpanded(true);
+ text_->setExpanded(true);
+
+ for (int i = 0; i < 3; ++i)
+ add_item_(key_map.at(i).first, key_map.at(i).second,
+ i == region::Line ||
+ i == region::Paragraph, text_);
+
+ for (int i = 3; i < key_map.size(); ++i)
+ add_item_(key_map.at(i).first, key_map.at(i).second, false, regions_);
+
QVBoxLayout* layout = new QVBoxLayout;
layout->addWidget(title);
layout->addWidget(items_);
- for (int i = 0; i < key_map.size(); ++i)
- add_item_(key_map[i].first, key_map[i].second,
- (i == region::Paragraph) ||
- (i == region::Line) );
-
setLayout(layout);
- connect(items_, SIGNAL(itemChanged(QListWidgetItem*)),
- this, SLOT(update(QListWidgetItem*)));
+ connect(items_, SIGNAL(itemChanged(QTreeWidgetItem*, int)),
+ this, SLOT(update(QTreeWidgetItem*)));
+}
+
+void KeyWidget::update_all()
+{
+ for (int i = 0; i < text_->childCount(); ++i)
+ update(text_->child(i));
+
+ for (int i = 0; i < regions_->childCount(); ++i)
+ update(regions_->child(i));
}
-void KeyWidget::checkAll()
+void KeyWidget::setAllCheck(QTreeWidgetItem* parent)
{
- for (int i = 0; i < items_->count(); ++i)
+ for (int i = 0; i < parent->childCount(); ++i)
{
- items_->item(i)->setCheckState(Qt::Checked);
- emit updated(i, true);
+ if (parent->checkState(0) == Qt::Checked)
+ parent->child(i)->setCheckState(0, Qt::Checked);
+ else
+ parent->child(i)->setCheckState(0, Qt::Unchecked);
+ update(parent->child(i));
}
}
-void
+void
KeyWidget::change_mode(bool b)
{
int id_region = region::Paragraph;
int id_line = region::Line;
+
if (b)
{
- items_->item(id_region)->setCheckState(Qt::Checked);
- items_->item(id_region)->setHidden(false);
- items_->item(id_line)->setCheckState(Qt::Checked);
- items_->item(id_line)->setHidden(false);
+ text_->child(id_region)->setCheckState(0, Qt::Checked);
+ text_->child(id_region)->setHidden(false);
+ text_->child(id_line)->setCheckState(0, Qt::Checked);
+ text_->child(id_line)->setHidden(false);
}
else
{
- items_->item(id_region)->setCheckState(Qt::Unchecked);
- items_->item(id_region)->setHidden(true);
- items_->item(id_line)->setCheckState(Qt::Unchecked);
- items_->item(id_line)->setHidden(true);
+ text_->child(id_region)->setCheckState(0, Qt::Unchecked);
+ text_->child(id_region)->setHidden(true);
+ text_->child(id_line)->setCheckState(0, Qt::Unchecked);
+ text_->child(id_line)->setHidden(true);
}
}
void
-KeyWidget::add_item_(QString text, QColor color, bool b)
+KeyWidget::add_item_(QString text, QColor color, bool b, QTreeWidgetItem* parent)
{
- QListWidgetItem* item = new QListWidgetItem(text);
+ QTreeWidgetItem* item = new QTreeWidgetItem(QStringList(text));
QPixmap pixmap(10, 6);
+
pixmap.fill(color);
- item->setIcon(QIcon(pixmap));
- item->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
- item->setCheckState(Qt::Checked);
- items_->addItem(item);
- int id = items_->row(item);
- items_->item(id)->setHidden(b);
+ item->setIcon(0, QIcon(pixmap));
+ item->setCheckState(0, Qt::Checked);
+ parent->addChild(item);
+ item->setHidden(b);
}
-bool
+ bool
KeyWidget::isChecked(region::RegionId id)
{
- return items_->item(id)->checkState() == Qt::Checked;
+ QTreeWidgetItem* item = text_->child(id);
+ if (item)
+ return item->checkState(0) == Qt::Checked;
+ else
+ {
+ item = regions_->child(id);
+ if(item)
+ return item->checkState(0) == Qt::Checked;
+ else
+ return false;
+ }
}
void
-KeyWidget::update(QListWidgetItem* item)
+KeyWidget::update(QTreeWidgetItem* item)
{
- int id = items_->row(item);
+ int id;
+ id = text_->indexOfChild(item);
+ if (id == -1)
+ id = regions_->indexOfChild(item) + 3;
+
+ emit updated(id, item->checkState(0) == Qt::Checked);
- emit updated(id, item->checkState() == Qt::Checked);
+ if (item == text_ || item == regions_)
+ {
+ setAllCheck(item);
+ return;
+ }
}
KeyWidget::~KeyWidget()
diff --git a/scribo/demo/viewer/key_widget.hh b/scribo/demo/viewer/key_widget.hh
index 71200c8..d7767b0 100644
--- a/scribo/demo/viewer/key_widget.hh
+++ b/scribo/demo/viewer/key_widget.hh
@@ -27,20 +27,24 @@ public:
KeyWidget(const region::KeyMap& key_map);
~KeyWidget();
- void checkAll();
bool isChecked(region::RegionId id);
+ QTreeWidget* items() { return items_; };
+ void update_all();
signals:
void updated(int key, bool checked);
private slots:
- void update(QListWidgetItem* slot);
void change_mode(bool b);
+ void update(QTreeWidgetItem* item);
+ void setAllCheck(QTreeWidgetItem* parent);
private:
- void add_item_(QString text, QColor color, bool b);
+ void add_item_(QString text, QColor color, bool b, QTreeWidgetItem* parent);
- QListWidget* items_;
+ QTreeWidget* items_;
+ QTreeWidgetItem* text_;
+ QTreeWidgetItem* regions_;
};
#endif /* !KEY_WIDGET_HH_ */
diff --git a/scribo/demo/viewer/step_widget.cc b/scribo/demo/viewer/step_widget.cc
index 7d35543..1020c6a 100644
--- a/scribo/demo/viewer/step_widget.cc
+++ b/scribo/demo/viewer/step_widget.cc
@@ -26,7 +26,8 @@
# include "step_widget.hh"
StepWidget::StepWidget()
- : view_(new QListWidget())
+ : view_(new QListWidget()),
+ step_(QString::Null())
{
QLabel* title = new QLabel(tr("Steps"));
title->setAlignment(Qt::AlignHCenter);
@@ -42,6 +43,9 @@ StepWidget::StepWidget()
connect(view_, SIGNAL(itemActivated(QListWidgetItem*)),
this, SLOT(activate(QListWidgetItem*)));
+
+ connect(this, SIGNAL(activated(QListWidgetItem*)),
+ this, SLOT(activate(QListWidgetItem*)));
}
void StepWidget::activate(QListWidgetItem* item)
@@ -49,18 +53,22 @@ void StepWidget::activate(QListWidgetItem* item)
QString key, value;
StepQMap::iterator iter = map_.find(item->text());
-
+
+ view_->setCurrentItem(item);
if (iter != map_.end())
{
+ step_ = item->text();
key = iter.key();
value = iter.value();
+
+ emit load_xml(value);
}
-
- emit load_xml(value);
+ else
+ qDebug() << "Step not found!";
}
-void StepWidget::fill_steps(QString file)
+void StepWidget::fill_steps(QString file, bool step)
{
view_->clear();
map_.clear();
@@ -69,13 +77,14 @@ void StepWidget::fill_steps(QString file)
emit load_image(file);
int cut = file.lastIndexOf(QChar('/'));
- QString path = file.left(cut+1);
+ QString path = file.left(cut+1);
QString filename = file.mid(cut+1);
-
+
cut = filename.lastIndexOf(QChar('.'));
+
QString file_with_no_ext = filename.left(cut);
// view_->addItem(file_with_no_ext);
-
+
QDir dir(path);
if (dir.isReadable())
@@ -84,7 +93,7 @@ void StepWidget::fill_steps(QString file)
filter << "*.xml";
QStringList xml_list = dir.entryList(filter);
for (int i = 0; i < xml_list.size(); ++i)
- {
+ {
if (xml_list.at(i).startsWith(file_with_no_ext))
{
cut = xml_list.at(i).lastIndexOf(QChar('.'));
@@ -99,6 +108,17 @@ void StepWidget::fill_steps(QString file)
}
}
}
+
+
+ if (step && step_ != QString::Null())
+ {
+ QList<QListWidgetItem*> list = view_->findItems(step_, Qt::MatchContains);
+
+ if (!list.isEmpty())
+ emit activated(list.first());
+ }
+ else
+ step_ = QString::Null();
}
void StepWidget::add_element(const QString& element)
diff --git a/scribo/demo/viewer/step_widget.hh b/scribo/demo/viewer/step_widget.hh
index 829f814..928e503 100644
--- a/scribo/demo/viewer/step_widget.hh
+++ b/scribo/demo/viewer/step_widget.hh
@@ -44,14 +44,16 @@ public:
signals:
void load_image(QString);
void load_xml(QString);
+ void activated(QListWidgetItem*);
public slots:
- void fill_steps(QString file);
+ void fill_steps(QString file, bool = false);
void activate(QListWidgetItem* item);
private:
QListWidget* view_;
StepQMap map_;
+ QString step_;
};
#endif /* !STEP_WIDGET_HH_ */
diff --git a/scribo/demo/viewer/viewer.cc b/scribo/demo/viewer/viewer.cc
index 61a57c1..b3fd6f5 100644
--- a/scribo/demo/viewer/viewer.cc
+++ b/scribo/demo/viewer/viewer.cc
@@ -44,6 +44,7 @@ Viewer::Viewer(int &argc, char** argv)
key_map_[region::Text] = qMakePair(tr("Text Region"), QColor(0, 200, 0));
key_map_[region::Paragraph] = qMakePair(tr("Paragraph"), QColor(0, 0, 255));
key_map_[region::Line] = qMakePair(tr("Text line"), QColor(255, 0, 0));
+
key_map_[region::Image] = qMakePair(tr("Image"), QColor(255, 120, 0));
key_map_[region::Noise] = qMakePair(tr("Noise"), QColor(43, 39, 128));
key_map_[region::Separator] = qMakePair(tr("Separator"), QColor(0, 0, 255));
@@ -70,7 +71,7 @@ Viewer::Viewer(int &argc, char** argv)
// Layout
- win_->resize(1024, 768);
+ win_->resize(1152, 864);
win_->statusBar();
QMenu* file_menu = win_->menuBar()->addMenu(tr("File"));
@@ -157,7 +158,7 @@ Viewer::Viewer(int &argc, char** argv)
win_->setCentralWidget(h_splitter);
QList<int> v_sizes;
- v_sizes << 300 << 200 << 200 << 300;
+ v_sizes << 200 << 200 << 300 << 400;
v_splitter->setSizes(v_sizes);
QList<int> v_sizes2;
@@ -168,8 +169,8 @@ Viewer::Viewer(int &argc, char** argv)
h_sizes << 200 << 700;
h_splitter->setSizes(h_sizes);
- connect(browser_wgt, SIGNAL(activated(QString)),
- step_widget, SLOT(fill_steps(QString)));
+ connect(browser_wgt, SIGNAL(activated(QString, bool)),
+ step_widget, SLOT(fill_steps(QString, bool)));
connect(step_widget, SIGNAL(load_image(QString)),
this, SLOT(load(QString)));
@@ -252,6 +253,11 @@ Viewer::load_xml(QString filename)
void
Viewer::xml_to_layout()
{
+
+ /* /!\ XML parsing is VERY UGLY /!\
+ TO DO: use same parsing as xml_transfrom. */
+
+
// Add layout info to the scene.
if (doc_layout_)
{
@@ -284,6 +290,7 @@ Viewer::xml_to_layout()
doc_layout_->data(point, Qt::UserRole).toMap();
int x = data["x"].toInt();
int y = data["y"].toInt();
+
points << QPoint(x, y);
}
@@ -396,8 +403,8 @@ Viewer::xml_to_layout()
attributes_line, points_line,
outline_action_->isChecked(),
fill_action_->isChecked(),
- precise_action_->isChecked(),
- key_wgt_->isChecked(id_line));
+ precise_action_->isChecked(),
+ key_wgt_->isChecked(id_line));
connect(this, SIGNAL(key_updated(int, bool)),
r_line, SLOT(setDrawIfSameId(int, bool)));
@@ -417,6 +424,7 @@ Viewer::xml_to_layout()
}
emit updated(doc_layout_);
+ key_wgt_->update_all();
}
}
@@ -427,7 +435,7 @@ Viewer::load(QString filename)
scene_->clear();
scene_->update();
image_ = 0;
- xml_file_ = "";
+ // xml_file_ = "";
// Load the image in a pixmap that is directly shown on screen.
// This is very slow when used with the normal rendering system.
@@ -482,7 +490,7 @@ Viewer::maybeChangeCacheMode(qreal scale)
void Viewer::useExtended(bool b)
{
extended_mode_ = b;
- key_wgt_->checkAll();
+ key_wgt_->update_all();
if (xml_file_ != QString(""))
load_xml(xml_file_);
diff --git a/scribo/demo/viewer/xml_widget.cc b/scribo/demo/viewer/xml_widget.cc
index fa050ec..36f0406 100644
--- a/scribo/demo/viewer/xml_widget.cc
+++ b/scribo/demo/viewer/xml_widget.cc
@@ -24,6 +24,7 @@ XmlWidget::XmlWidget()
title->setAlignment(Qt::AlignHCenter);
QVBoxLayout* layout = new QVBoxLayout;
+
layout->addWidget(title);
layout->addWidget(view_);
@@ -34,7 +35,7 @@ void
XmlWidget::update(DomModel* model)
{
view_->setModel(model);
- view_->resizeColumnToContents(2);
+ // view_->resizeColumnToContents(2);
}
void
--
1.5.6.5
1
0
* scribo/ChangeLog: Move 2010-07-08 entry in...
* scribo/sandbox/ChangeLog:...this.
---
scribo/ChangeLog | 44 +++----------------------
scribo/sandbox/ChangeLog | 80 ++++++++++++++++++++++++++++++++++------------
2 files changed, 65 insertions(+), 59 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index df16c98..d40a197 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,41 +1,9 @@
-2010-07-08 Arthur Crepin-Leblond <crepin(a)ptaouchnok.lrde.epita.fr>
-
- XML transform program.
-
- * sandbox/arthur/xml_to_html/xml_to_html.hh,
- * sandbox/arthur/xml_to_html/xml_to_html.cc,
- * sandbox/arthur/xml_to_html/xml_to_html.pro: Remove.
-
- * sandbox/arthur/xml_to_html/README,
- * sandbox/arthur/xml_to_html/main.cc,
- * sandbox/arthur/xml_to_html/domitem.cc,
- * sandbox/arthur/xml_to_html/domitem.hh,
- * sandbox/arthur/xml_to_html/dommodel.cc,
- * sandbox/arthur/xml_to_html/dommodel.hh: Move to...
-
- * sandbox/arthur/xml_transform/README,
- * sandbox/arthur/xml_transform/main.cc,
- * sandbox/arthur/xml_transform/domitem.cc,
- * sandbox/arthur/xml_transform/domitem.hh,
- * sandbox/arthur/xml_transform/dommodel.cc,
- * sandbox/arthur/xml_transform/dommodel.hh: ...this.
-
- * sandbox/arthur/xml_to_html/patterns/css.css,
- * sandbox/arthur/xml_to_html/patterns/xsl.xsl: Move to...
-
- * sandbox/arthur/xml_transform/templates/html/css.css,
- * sandbox/arthur/xml_transform/templates/html/xsl.xsl: ...this.
-
- * sandbox/arthur/xml_transform/image_crop.cc,
- * sandbox/arthur/xml_transform/loader.cc: New.
-
- * sandbox/arthur/xml_transform/templates/html/html_generator.sh,
- * sandbox/arthur/xml_transform/templates/pdf/line.xsl,
- * sandbox/arthur/xml_transform/templates/pdf/main.xsl,
- * sandbox/arthur/xml_transform/templates/pdf/main_crop.xsl,
- * sandbox/arthur/xml_transform/templates/pdf/pdf_generator.sh,
- * sandbox/arthur/xml_transform/templates/pdf/regions.xsl,
- * sandbox/arthur/xml_transform/xml_transform.pro: New.
+2010-07-16 Arthur Crepin-Leblond <crepin(a)ptaouchnok.lrde.epita.fr>
+
+ ChangeLog mistake.
+
+ * scribo/ChangeLog: Move 2010-07-08 entry in...
+ * scribo/sandbox/ChangeLog:...this.
2010-07-05 Arthur Crepin-Leblond <crepin(a)stockholm.lrde.epita.fr>
diff --git a/scribo/sandbox/ChangeLog b/scribo/sandbox/ChangeLog
index 0fb733f..8d7b3e9 100644
--- a/scribo/sandbox/ChangeLog
+++ b/scribo/sandbox/ChangeLog
@@ -2,34 +2,72 @@
XML Tranform.
- * scribo/sandbox/arthur/xml_transform/xml_transform.cc,
- * scribo/sandbox/arthur/xml_transform/xml_transform.hh: Facade.
+ * arthur/xml_transform/xml_transform.cc,
+ * arthur/xml_transform/xml_transform.hh: Facade.
- * scribo/sandbox/arthur/xml_transform/image_crop.cc,
- * scribo/sandbox/arthur/xml_transform/image_crop.hh: Image process.
+ * arthur/xml_transform/image_crop.cc,
+ * arthur/xml_transform/image_crop.hh: Image process.
- * scribo/sandbox/arthur/xml_transform/loader.cc,
- * scribo/sandbox/arthur/xml_transform/loader.hh: XML loader.
+ * arthur/xml_transform/loader.cc,
+ * arthur/xml_transform/loader.hh: XML loader.
- * scribo/sandbox/arthur/xml_transform/main.cc
- * scribo/sandbox/arthur/xml_transform/templates/html/xsl.xsl
- * scribo/sandbox/arthur/xml_transform/xml_transform.pro
- * scribo/sandbox/arthur/xml_transform/README
+ * arthur/xml_transform/main.cc
+ * arthur/xml_transform/templates/html/xsl.xsl
+ * arthur/xml_transform/xml_transform.pro
+ * arthur/xml_transform/README
- * scribo/sandbox/arthur/xml_transform/common.cc,
- * scribo/sandbox/arthur/xml_transform/common.hh,
- * scribo/sandbox/arthur/xml_transform/templates/html/xsl_base64.xsl,
- * scribo/sandbox/arthur/xml_transform/templates/pdf/main64.xsl,
- * scribo/sandbox/arthur/xml_transform/templates/pdf/regions_base64.xsl: New.
+ * arthur/xml_transform/common.cc,
+ * arthur/xml_transform/common.hh,
+ * arthur/xml_transform/templates/html/xsl_base64.xsl,
+ * arthur/xml_transform/templates/pdf/main64.xsl,
+ * arthur/xml_transform/templates/pdf/regions_base64.xsl: New.
- * scribo/sandbox/arthur/xml_transform/domitem.cc,
- * scribo/sandbox/arthur/xml_transform/domitem.hh,
- * scribo/sandbox/arthur/xml_transform/dommodel.cc,
- * scribo/sandbox/arthur/xml_transform/dommodel.hh: Delete.
+ * arthur/xml_transform/domitem.cc,
+ * arthur/xml_transform/domitem.hh,
+ * arthur/xml_transform/dommodel.cc,
+ * arthur/xml_transform/dommodel.hh: Delete.
- * scribo/sandbox/arthur/xml_transform/templates/pdf/regions.xsl: Rename as...
- * scribo/sandbox/arthur/xml_transform/templates/pdf/regions_png.xsl:...this.
+ * arthur/xml_transform/templates/pdf/regions.xsl: Rename as...
+ * arthur/xml_transform/templates/pdf/regions_png.xsl:...this.
+2010-07-08 Arthur Crepin-Leblond <crepin(a)ptaouchnok.lrde.epita.fr>
+
+ XML transform program.
+
+ * arthur/xml_to_html/xml_to_html.hh,
+ * arthur/xml_to_html/xml_to_html.cc,
+ * arthur/xml_to_html/xml_to_html.pro: Remove.
+
+ * arthur/xml_to_html/README,
+ * arthur/xml_to_html/main.cc,
+ * arthur/xml_to_html/domitem.cc,
+ * arthur/xml_to_html/domitem.hh,
+ * arthur/xml_to_html/dommodel.cc,
+ * arthur/xml_to_html/dommodel.hh: Move to...
+
+ * arthur/xml_transform/README,
+ * arthur/xml_transform/main.cc,
+ * arthur/xml_transform/domitem.cc,
+ * arthur/xml_transform/domitem.hh,
+ * arthur/xml_transform/dommodel.cc,
+ * arthur/xml_transform/dommodel.hh: ...this.
+
+ * arthur/xml_to_html/patterns/css.css,
+ * arthur/xml_to_html/patterns/xsl.xsl: Move to...
+
+ * arthur/xml_transform/templates/html/css.css,
+ * arthur/xml_transform/templates/html/xsl.xsl: ...this.
+
+ * arthur/xml_transform/image_crop.cc,
+ * arthur/xml_transform/loader.cc: New.
+
+ * arthur/xml_transform/templates/html/html_generator.sh,
+ * arthur/xml_transform/templates/pdf/line.xsl,
+ * arthur/xml_transform/templates/pdf/main.xsl,
+ * arthur/xml_transform/templates/pdf/main_crop.xsl,
+ * arthur/xml_transform/templates/pdf/pdf_generator.sh,
+ * arthur/xml_transform/templates/pdf/regions.xsl,
+ * arthur/xml_transform/xml_transform.pro: New.
2010-07-05 Arthur Crepin-Leblond <crepin(a)stockholm.lrde.epita.fr>
--
1.5.6.5
1
0

15 Jul '10
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Olena, a generic and efficient image processing platform".
The branch mesh-segm-skel has been updated
via 5e82f8f41121a6f4724fcbe6687673f070c6bf31 (commit)
via dd86adeb2178f0fa89f6183589eba917f7a0e9c1 (commit)
from c68caaf54cabebfd094a596d54fa6517dac6278b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
5e82f8f Configure tests in mesh-segm-skel apps.
dd86ade mesh-complex-pinv-curv-segm and mesh-complex-pinv-curv-skel apps.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 8 ++++++
configure.ac | 4 +++
milena/ChangeLog | 25 ++++++++++++++++++++
milena/apps/mesh-segm-skel/Makefile.am | 20 ++++++++++++----
.../mesh-segm-skel/mesh-complex-max-curv-segm.cc | 19 ++++-----------
.../mesh-segm-skel/mesh-complex-max-curv-skel.cc | 12 ++-------
...curv-segm.cc => mesh-complex-pinv-curv-segm.cc} | 20 ++++++---------
...curv-skel.cc => mesh-complex-pinv-curv-skel.cc} | 23 ++++++++---------
...segm.in => test-mesh-complex-pinv-curv-segm.in} | 9 ++++---
...skel.in => test-mesh-complex-pinv-curv-skel.in} | 6 ++--
10 files changed, 87 insertions(+), 59 deletions(-)
copy milena/apps/mesh-segm-skel/{mesh-complex-max-curv-segm.cc => mesh-complex-pinv-curv-segm.cc} (91%)
copy milena/apps/mesh-segm-skel/{mesh-complex-max-curv-skel.cc => mesh-complex-pinv-curv-skel.cc} (94%)
copy milena/apps/mesh-segm-skel/{test-mesh-segm.in => test-mesh-complex-pinv-curv-segm.in} (65%)
mode change 100755 => 100644
copy milena/apps/mesh-segm-skel/{test-mesh-complex-max-curv-skel.in => test-mesh-complex-pinv-curv-skel.in} (72%)
hooks/post-receive
--
Olena, a generic and efficient image processing platform
1
0

last-svn-commit-178-g208f43e Have AC_PROG_SWIG be more flexible w.r.t. major/minor version numbers.
by Roland Levillain 15 Jul '10
by Roland Levillain 15 Jul '10
15 Jul '10
* m4/swig.m4: Here.
---
ChangeLog | 6 ++++++
m4/swig.m4 | 9 ++++++---
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3f272c2..ef23d3b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-06-29 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Have AC_PROG_SWIG be more flexible w.r.t. major/minor version numbers.
+
+ * m4/swig.m4: Here.
+
2010-04-01 Roland Levillain <roland(a)lrde.epita.fr>
Stop configuring swilena/python/sps and swilena/python/sps-local.
diff --git a/m4/swig.m4 b/m4/swig.m4
index ad0ee3b..46672c5 100644
--- a/m4/swig.m4
+++ b/m4/swig.m4
@@ -61,9 +61,12 @@ AC_DEFUN([AC_PROG_SWIG],[
if test -z "$available_patch" ; then
[available_patch=0]
fi
- if test $available_major -ne $required_major \
- -o $available_minor -ne $required_minor \
- -o $available_patch -lt $required_patch ; then
+ if test \
+ $available_major -lt $required_major \
+ -o \( $available_major -eq $required_major \
+ -a \( $available_minor -lt $required_minor \
+ -o \( $available_minor -eq $required_minor \
+ -a $available_patch -lt $required_patch \) \) \) ; then
AC_MSG_WARN([SWIG version >= $1 is required. You have $swig_version. You should look at http://www.swig.org]
SWIG='echo "Error: SWIG version >= $1 is required. You have '"$swig_version"'. You should look at http://www.swig.org" ; false'
else
--
1.5.6.5
1
0
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Olena, a generic and efficient image processing platform".
The branch swilena has been updated
via 208f43e3faa18851968542e4c15336b1b3ba1bf4 (commit)
from 2358392f48a9191f72851cc299eb5bedcf303659 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
208f43e Have AC_PROG_SWIG be more flexible w.r.t. major/minor version numbers.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 ++++++
m4/swig.m4 | 9 ++++++---
2 files changed, 12 insertions(+), 3 deletions(-)
hooks/post-receive
--
Olena, a generic and efficient image processing platform
1
0

15 Jul '10
---
milena/sandbox/ChangeLog | 44 ++++++++++++++++++++++----------------------
1 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/milena/sandbox/ChangeLog b/milena/sandbox/ChangeLog
index 9e7f25b..41fa0d5 100644
--- a/milena/sandbox/ChangeLog
+++ b/milena/sandbox/ChangeLog
@@ -41,28 +41,28 @@
2009-11-06 Fabien Freling <fabien.freling(a)lrde.epita.fr>
Update usage message.
- * fabien/igr/clo_vol.cc,
- fabien/igr/color/find_color.cc,
- fabien/igr/crop.cc,
- fabien/igr/dist_edges.cc,
- fabien/igr/filter.cc,
- fabien/igr/filter_morpho_us.cc,
- fabien/igr/fun_labels.cc,
- fabien/igr/grad.cc,
- fabien/igr/graph.cc,
- fabien/igr/label2gif.cc,
- fabien/igr/maj.cc,
- fabien/igr/mean_median_label.cc,
- fabien/igr/mean_slices.cc,
- fabien/igr/med.cc,
- fabien/igr/min_max_float.cc,
- fabien/igr/nbasins_finder.cc,
- fabien/igr/norm.cc,
- fabien/igr/thres.cc,
- fabien/igr/time_max.cc,
- fabien/igr/time_max_norm.cc,
- fabien/igr/wst.cc,
- fabien/igr/wst_edges.cc: Udate usage message.
+ * fabien/igr/clo_vol.cc,
+ * fabien/igr/color/find_color.cc,
+ * fabien/igr/crop.cc,
+ * fabien/igr/dist_edges.cc,
+ * fabien/igr/filter.cc,
+ * fabien/igr/filter_morpho_us.cc,
+ * fabien/igr/fun_labels.cc,
+ * fabien/igr/grad.cc,
+ * fabien/igr/graph.cc,
+ * fabien/igr/label2gif.cc,
+ * fabien/igr/maj.cc,
+ * fabien/igr/mean_median_label.cc,
+ * fabien/igr/mean_slices.cc,
+ * fabien/igr/med.cc,
+ * fabien/igr/min_max_float.cc,
+ * fabien/igr/nbasins_finder.cc,
+ * fabien/igr/norm.cc,
+ * fabien/igr/thres.cc,
+ * fabien/igr/time_max.cc,
+ * fabien/igr/time_max_norm.cc,
+ * fabien/igr/wst.cc,
+ * fabien/igr/wst_edges.cc: Udate usage message.
2009-11-03 Guillaume Lazzara <z(a)lrde.epita.fr>
--
1.5.6.5
1
0

15 Jul '10
* configure.ac: Configure
milena/apps/mesh-segm-skel/test-mesh-complex-pinv-curv-segm and
milena/apps/mesh-segm-skel/test-mesh-complex-pinv-curv-skel.
---
ChangeLog | 8 ++++++++
configure.ac | 4 ++++
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6e0e5b5..e0d0eef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-07-15 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Configure tests in mesh-segm-skel apps.
+
+ * configure.ac: Configure
+ milena/apps/mesh-segm-skel/test-mesh-complex-pinv-curv-segm and
+ milena/apps/mesh-segm-skel/test-mesh-complex-pinv-curv-skel.
+
2010-06-14 Roland Levillain <roland(a)lrde.epita.fr>
Configure milena/apps/mesh-segm-skel/test-mesh-complex-max-curv-skel.
diff --git a/configure.ac b/configure.ac
index 8c96e04..62a95a0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -513,10 +513,14 @@ AC_CONFIG_FILES([milena/apps/mesh-segm-skel/test-mesh-complex-segm],
[chmod +x milena/apps/mesh-segm-skel/test-mesh-complex-segm])
AC_CONFIG_FILES([milena/apps/mesh-segm-skel/test-mesh-complex-max-curv-segm],
[chmod +x milena/apps/mesh-segm-skel/test-mesh-complex-max-curv-segm])
+AC_CONFIG_FILES([milena/apps/mesh-segm-skel/test-mesh-complex-pinv-curv-segm],
+ [chmod +x milena/apps/mesh-segm-skel/test-mesh-complex-pinv-curv-segm])
AC_CONFIG_FILES([milena/apps/mesh-segm-skel/test-mesh-complex-skel],
[chmod +x milena/apps/mesh-segm-skel/test-mesh-complex-skel])
AC_CONFIG_FILES([milena/apps/mesh-segm-skel/test-mesh-complex-max-curv-skel],
[chmod +x milena/apps/mesh-segm-skel/test-mesh-complex-max-curv-skel])
+AC_CONFIG_FILES([milena/apps/mesh-segm-skel/test-mesh-complex-pinv-curv-skel],
+ [chmod +x milena/apps/mesh-segm-skel/test-mesh-complex-pinv-curv-skel])
AC_CONFIG_FILES([milena/apps/constrained-connectivity/test-constrained-connectivity],
[chmod +x milena/apps/constrained-connectivity/test-constrained-connectivity])
--
1.5.6.5
1
0

last-svn-commit-189-gdd86ade mesh-complex-pinv-curv-segm and mesh-complex-pinv-curv-skel apps.
by Roland Levillain 15 Jul '10
by Roland Levillain 15 Jul '10
15 Jul '10
* apps/mesh-segm-skel/mesh-complex-pinv-curv-segm.cc,
* apps/mesh-segm-skel/mesh-complex-pinv-curv-skel.cc:
New.
* apps/mesh-segm-skel/mesh-complex-max-curv-segm.cc,
* apps/mesh-segm-skel/mesh-complex-max-curv-skel.cc:
Remove dead code.
* apps/mesh-segm-skel/test-mesh-complex-pinv-curv-segm.in,
* apps/mesh-segm-skel/test-mesh-complex-pinv-curv-skel.in:
New.
* apps/mesh-segm-skel/Makefile.am (bin_PROGRAMS): Add
mesh-complex-pinv-curv-segm and mesh-complex-pinv-curv-skel.
(mesh_complex_pinv_curv_segm_SOURCES)
(mesh_complex_pinv_curv_skel_SOURCES):
New.
(TESTS): Add test-mesh-complex-pinv-curv-segm and
test-mesh-complex-pinv-curv-skel.
(MOSTLYCLEANFILES): Add socket-complex-pinv-curv-segm.off,
teapot-complex-pinv-curv-segm.off,
socket-complex-pinv-curv-skel.off and
teapot-complex-pinv-curv-skel.off.
---
milena/ChangeLog | 25 ++++++++++++++++++++
milena/apps/mesh-segm-skel/Makefile.am | 20 ++++++++++++----
.../mesh-segm-skel/mesh-complex-max-curv-segm.cc | 19 ++++-----------
.../mesh-segm-skel/mesh-complex-max-curv-skel.cc | 12 ++-------
...curv-segm.cc => mesh-complex-pinv-curv-segm.cc} | 20 ++++++---------
...curv-skel.cc => mesh-complex-pinv-curv-skel.cc} | 23 ++++++++---------
...segm.in => test-mesh-complex-pinv-curv-segm.in} | 9 ++++---
...skel.in => test-mesh-complex-pinv-curv-skel.in} | 6 ++--
8 files changed, 75 insertions(+), 59 deletions(-)
copy milena/apps/mesh-segm-skel/{mesh-complex-max-curv-segm.cc => mesh-complex-pinv-curv-segm.cc} (91%)
copy milena/apps/mesh-segm-skel/{mesh-complex-max-curv-skel.cc => mesh-complex-pinv-curv-skel.cc} (94%)
copy milena/apps/mesh-segm-skel/{test-mesh-segm.in => test-mesh-complex-pinv-curv-segm.in} (65%)
mode change 100755 => 100644
copy milena/apps/mesh-segm-skel/{test-mesh-complex-max-curv-skel.in => test-mesh-complex-pinv-curv-skel.in} (72%)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 1fe8399..3d8b6bc 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,28 @@
+2010-07-15 Roland Levillain <roland(a)lrde.epita.fr>
+
+ mesh-complex-pinv-curv-segm and mesh-complex-pinv-curv-skel apps.
+
+ * apps/mesh-segm-skel/mesh-complex-pinv-curv-segm.cc,
+ * apps/mesh-segm-skel/mesh-complex-pinv-curv-skel.cc:
+ New.
+ * apps/mesh-segm-skel/mesh-complex-max-curv-segm.cc,
+ * apps/mesh-segm-skel/mesh-complex-max-curv-skel.cc:
+ Remove dead code.
+ * apps/mesh-segm-skel/test-mesh-complex-pinv-curv-segm.in,
+ * apps/mesh-segm-skel/test-mesh-complex-pinv-curv-skel.in:
+ New.
+ * apps/mesh-segm-skel/Makefile.am (bin_PROGRAMS): Add
+ mesh-complex-pinv-curv-segm and mesh-complex-pinv-curv-skel.
+ (mesh_complex_pinv_curv_segm_SOURCES)
+ (mesh_complex_pinv_curv_skel_SOURCES):
+ New.
+ (TESTS): Add test-mesh-complex-pinv-curv-segm and
+ test-mesh-complex-pinv-curv-skel.
+ (MOSTLYCLEANFILES): Add socket-complex-pinv-curv-segm.off,
+ teapot-complex-pinv-curv-segm.off,
+ socket-complex-pinv-curv-skel.off and
+ teapot-complex-pinv-curv-skel.off.
+
2010-06-14 Roland Levillain <roland(a)lrde.epita.fr>
Actually use the maximal curvature in mesh-complex-max-curv-segm.
diff --git a/milena/apps/mesh-segm-skel/Makefile.am b/milena/apps/mesh-segm-skel/Makefile.am
index 868c7d6..5dda5ec 100644
--- a/milena/apps/mesh-segm-skel/Makefile.am
+++ b/milena/apps/mesh-segm-skel/Makefile.am
@@ -171,9 +171,13 @@ MOSTLYCLEANFILES += \
socket-complex-max-curv-segm.off \
teapot-complex-max-curv-segm.off
-# FIXME: Implement `mesh-complex-pinv-curv-segm' (factor as much
-# code as possible with `mesh-complex-max-curv-segm'.
-# ...
+# Likewise, but using pseudo-inverse curvature.
+bin_PROGRAMS += mesh-complex-pinv-curv-segm
+mesh_complex_pinv_curv_segm_SOURCES = mesh-complex-pinv-curv-segm.cc
+TESTS += test-mesh-complex-pinv-curv-segm
+MOSTLYCLEANFILES += \
+ socket-complex-pinv-curv-segm.off \
+ teapot-complex-pinv-curv-segm.off
## Skeletonization.
## ----------------
@@ -187,8 +191,6 @@ MOSTLYCLEANFILES += \
teapot-max-curv.off \
three-triangles-skel.off
-# FIXME: Implement `mesh-complex-{max,pinv}-curv-skel'.
-# ...
bin_PROGRAMS += mesh-complex-max-curv-skel
mesh_complex_max_curv_skel_SOURCES = \
mesh-complex-max-curv-skel.cc save_bin_alt.hh
@@ -196,3 +198,11 @@ TESTS += test-mesh-complex-max-curv-skel
MOSTLYCLEANFILES += \
socket-complex-max-curv-skel.off \
teapot-complex-max-curv-skel.off
+
+bin_PROGRAMS += mesh-complex-pinv-curv-skel
+mesh_complex_pinv_curv_skel_SOURCES = \
+ mesh-complex-pinv-curv-skel.cc save_bin_alt.hh
+TESTS += test-mesh-complex-pinv-curv-skel
+MOSTLYCLEANFILES += \
+ socket-complex-pinv-curv-skel.off \
+ teapot-complex-pinv-curv-skel.off
diff --git a/milena/apps/mesh-segm-skel/mesh-complex-max-curv-segm.cc b/milena/apps/mesh-segm-skel/mesh-complex-max-curv-segm.cc
index a7a741a..aa55244 100644
--- a/milena/apps/mesh-segm-skel/mesh-complex-max-curv-segm.cc
+++ b/milena/apps/mesh-segm-skel/mesh-complex-max-curv-segm.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009, 2010 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of the Milena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -30,6 +31,8 @@
/// surface of the (triangle) mesh of a statue, then performing a
/// WST-based segmentation, using a complex-based image.
+// Factor with mesh-complex-pinv-curv-segm.cc.
+
#include <cstdlib>
#include <cmath>
@@ -53,10 +56,6 @@
#include "trimesh/misc.hh"
-// Doesn't C++ have a better way to express Pi?
-static const float pi = 4 * atanf(1);
-
-
int main(int argc, char* argv[])
{
if (argc != 4)
@@ -91,17 +90,9 @@ int main(int argc, char* argv[])
mln::p_n_faces_fwd_piter<D, G> v(float_ima.domain(), 0);
for_all(v)
{
- // FIXME: The program should allow the user to choose the kind
- // of measure (curvature).
-#if 0
- float h = (curv.first(v) + curv.second(v)) / 2;
- // Pseudo-inverse curvature.
- float h_inv = 1 / pi * (atan(-h) + pi / 2);
- float_ima(v) = h_inv;
-#endif
// Max curvature.
float_ima(v) = mln::math::max(mln::math::sqr(curv.first(v)),
- mln::math::sqr(curv.second(v)));
+ mln::math::sqr(curv.second(v)));
}
// Values on edges.
diff --git a/milena/apps/mesh-segm-skel/mesh-complex-max-curv-skel.cc b/milena/apps/mesh-segm-skel/mesh-complex-max-curv-skel.cc
index a174dd6..b910aae 100644
--- a/milena/apps/mesh-segm-skel/mesh-complex-max-curv-skel.cc
+++ b/milena/apps/mesh-segm-skel/mesh-complex-max-curv-skel.cc
@@ -29,9 +29,11 @@
/// \file apps/mesh-segm-skel/mesh-complex-max-curv-skel.cc
/// \brief A program computing the maximal curvature values from the
/// surface of the (triangle) mesh of a statue, then computing a
-/// skeleton of this surface (by/ thinning), using a complex-based
+/// skeleton of this surface (by thinning), using a complex-based
/// image.
+// FIXME: Factor with mesh-complex-pinv-curv-skel.cc.
+
#include <iostream>
#include <mln/core/image/complex_image.hh>
@@ -92,14 +94,6 @@ main(int argc, char* argv[])
mln::p_n_faces_fwd_piter<D, G> v(float_ima.domain(), 0);
for_all(v)
{
- // FIXME: The program should allow the user to choose the kind
- // of measure (curvature).
-#if 0
- float h = (curv.first(v) + curv.second(v)) / 2;
- // Pseudo-inverse curvature.
- float h_inv = 1 / pi * (atan(-h) + pi / 2);
- float_ima(v) = h_inv;
-#endif
// Max curvature.
float_ima(v) = mln::math::max(mln::math::sqr(curv.first(v)),
mln::math::sqr(curv.second(v)));
diff --git a/milena/apps/mesh-segm-skel/mesh-complex-max-curv-segm.cc b/milena/apps/mesh-segm-skel/mesh-complex-pinv-curv-segm.cc
similarity index 91%
copy from milena/apps/mesh-segm-skel/mesh-complex-max-curv-segm.cc
copy to milena/apps/mesh-segm-skel/mesh-complex-pinv-curv-segm.cc
index a7a741a..fe7ee70 100644
--- a/milena/apps/mesh-segm-skel/mesh-complex-max-curv-segm.cc
+++ b/milena/apps/mesh-segm-skel/mesh-complex-pinv-curv-segm.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009, 2010 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of the Milena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -25,10 +26,12 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file apps/mesh-segm-skel/mesh-complex-max-curv-segm.cc
-/// \brief A program computing the maximal curvature values from the
-/// surface of the (triangle) mesh of a statue, then performing a
-/// WST-based segmentation, using a complex-based image.
+/// \file apps/mesh-segm-skel/mesh-complex-pinv-curv-segm.cc
+/// \brief A program computing the pseudo-inverse curvature values
+/// from the surface of the (triangle) mesh of a statue, then
+/// performing a WST-based segmentation, using a complex-based image.
+
+// Factor with mesh-complex-max-curv-segm.cc.
#include <cstdlib>
#include <cmath>
@@ -91,17 +94,10 @@ int main(int argc, char* argv[])
mln::p_n_faces_fwd_piter<D, G> v(float_ima.domain(), 0);
for_all(v)
{
- // FIXME: The program should allow the user to choose the kind
- // of measure (curvature).
-#if 0
float h = (curv.first(v) + curv.second(v)) / 2;
// Pseudo-inverse curvature.
float h_inv = 1 / pi * (atan(-h) + pi / 2);
float_ima(v) = h_inv;
-#endif
- // Max curvature.
- float_ima(v) = mln::math::max(mln::math::sqr(curv.first(v)),
- mln::math::sqr(curv.second(v)));
}
// Values on edges.
diff --git a/milena/apps/mesh-segm-skel/mesh-complex-max-curv-skel.cc b/milena/apps/mesh-segm-skel/mesh-complex-pinv-curv-skel.cc
similarity index 94%
copy from milena/apps/mesh-segm-skel/mesh-complex-max-curv-skel.cc
copy to milena/apps/mesh-segm-skel/mesh-complex-pinv-curv-skel.cc
index a174dd6..4a59a6b 100644
--- a/milena/apps/mesh-segm-skel/mesh-complex-max-curv-skel.cc
+++ b/milena/apps/mesh-segm-skel/mesh-complex-pinv-curv-skel.cc
@@ -26,11 +26,13 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file apps/mesh-segm-skel/mesh-complex-max-curv-skel.cc
-/// \brief A program computing the maximal curvature values from the
-/// surface of the (triangle) mesh of a statue, then computing a
-/// skeleton of this surface (by/ thinning), using a complex-based
-/// image.
+/// \file apps/mesh-segm-skel/mesh-complex-pinv-curv-skel.cc
+/// \brief A program computing the pseudo-inverse curvature values
+/// from the surface of the (triangle) mesh of a statue, then
+/// computing a skeleton of this surface (by thinning), using a
+/// complex-based image.
+
+// FIXME: Factor with mesh-complex-max-curv-skel.cc.
#include <iostream>
@@ -57,6 +59,10 @@
#include "trimesh/misc.hh"
+// Doesn't C++ have a better way to express Pi?
+static const float pi = 4 * atanf(1);
+
+
int
main(int argc, char* argv[])
{
@@ -92,17 +98,10 @@ main(int argc, char* argv[])
mln::p_n_faces_fwd_piter<D, G> v(float_ima.domain(), 0);
for_all(v)
{
- // FIXME: The program should allow the user to choose the kind
- // of measure (curvature).
-#if 0
float h = (curv.first(v) + curv.second(v)) / 2;
// Pseudo-inverse curvature.
float h_inv = 1 / pi * (atan(-h) + pi / 2);
float_ima(v) = h_inv;
-#endif
- // Max curvature.
- float_ima(v) = mln::math::max(mln::math::sqr(curv.first(v)),
- mln::math::sqr(curv.second(v)));
}
// Values on triangles.
diff --git a/milena/apps/mesh-segm-skel/test-mesh-segm.in b/milena/apps/mesh-segm-skel/test-mesh-complex-pinv-curv-segm.in
old mode 100755
new mode 100644
similarity index 65%
copy from milena/apps/mesh-segm-skel/test-mesh-segm.in
copy to milena/apps/mesh-segm-skel/test-mesh-complex-pinv-curv-segm.in
index e70e63a..345aefd
--- a/milena/apps/mesh-segm-skel/test-mesh-segm.in
+++ b/milena/apps/mesh-segm-skel/test-mesh-complex-pinv-curv-segm.in
@@ -1,6 +1,7 @@
#! /bin/sh
-# Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE).
+# Copyright (C) 2008, 2009, 2010 EPITA Research and Development
+# Laboratory (LRDE).
#
# This file is part of Olena.
#
@@ -20,7 +21,7 @@ set -ex
mesh_dir=@top_srcdir@/milena/mesh
-time ./mesh-segm $mesh_dir/socket.off 25 socket-segm.off
-time ./mesh-segm $mesh_dir/teapot.off 50 teapot-segm.off
+time ./mesh-complex-pinv-curv-segm $mesh_dir/socket.off 25 socket-complex-pinv-curv-segm.off
+time ./mesh-complex-pinv-curv-segm $mesh_dir/teapot.off 50 teapot-complex-pinv-curv-segm.off
# FIXME: Too long. Should be run with (future) target `check-full'.
-#time ./mesh-segm $mesh_dir/bunny-holefilled.off 500 bunny-holefilled-segm.off
+#time ./mesh-complex-pinv-curv-segm $mesh_dir/bunny-holefilled.off 500 bunny-holefilled-complex-pinv-curv-segm.off
diff --git a/milena/apps/mesh-segm-skel/test-mesh-complex-max-curv-skel.in b/milena/apps/mesh-segm-skel/test-mesh-complex-pinv-curv-skel.in
similarity index 72%
copy from milena/apps/mesh-segm-skel/test-mesh-complex-max-curv-skel.in
copy to milena/apps/mesh-segm-skel/test-mesh-complex-pinv-curv-skel.in
index ea7f604..0af2151 100644
--- a/milena/apps/mesh-segm-skel/test-mesh-complex-max-curv-skel.in
+++ b/milena/apps/mesh-segm-skel/test-mesh-complex-pinv-curv-skel.in
@@ -20,7 +20,7 @@ set -ex
mesh_dir=@top_srcdir@/milena/mesh
-time ./mesh-complex-max-curv-skel $mesh_dir/socket.off 10 socket-complex-max-curv-skel.off
-time ./mesh-complex-max-curv-skel $mesh_dir/teapot.off 20 teapot-complex-max-curv-skel.off
+time ./mesh-complex-pinv-curv-skel $mesh_dir/socket.off 10 socket-complex-pinv-curv-skel.off
+time ./mesh-complex-pinv-curv-skel $mesh_dir/teapot.off 20 teapot-complex-pinv-curv-skel.off
# FIXME: Too long. Should be run with (future) target `check-full'.
-#time ./mesh-complex-max-curv-skel $mesh_dir/bunny-holefilled.off 50 bunny-holefilled-complex-max-curv-skel.off
+time ./mesh-complex-pinv-curv-skel $mesh_dir/bunny-holefilled.off 50 bunny-holefilled-complex-pinv-curv-skel.off
--
1.5.6.5
1
0

15 Jul '10
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Olena, a generic and efficient image processing platform".
The branch exp/scribo-z has been updated
via 1454557f814a8f278ec51d567340bf7732895825 (commit)
from 128ad1a04f7f6b35a67caf9fa878ab1054bbbfdf (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
1454557 XML Tranform.
-----------------------------------------------------------------------
Summary of changes:
scribo/sandbox/ChangeLog | 33 +++
scribo/sandbox/arthur/xml_transform/README | 25 +-
scribo/sandbox/arthur/xml_transform/common.cc | 13 +
scribo/sandbox/arthur/xml_transform/common.hh | 16 +
scribo/sandbox/arthur/xml_transform/domitem.cc | 98 -------
scribo/sandbox/arthur/xml_transform/domitem.hh | 75 -----
scribo/sandbox/arthur/xml_transform/dommodel.cc | 198 -------------
scribo/sandbox/arthur/xml_transform/dommodel.hh | 85 ------
scribo/sandbox/arthur/xml_transform/image_crop.cc | 303 ++++++++++++++------
scribo/sandbox/arthur/xml_transform/image_crop.hh | 19 +-
scribo/sandbox/arthur/xml_transform/loader.cc | 124 +++++----
scribo/sandbox/arthur/xml_transform/loader.hh | 17 +-
scribo/sandbox/arthur/xml_transform/main.cc | 78 +++++-
.../arthur/xml_transform/templates/html/xsl.xsl | 3 +-
.../templates/html/{xsl.xsl => xsl_base64.xsl} | 9 +-
.../templates/pdf/{main.xsl => main64.xsl} | 2 +-
.../pdf/{regions.xsl => regions_base64.xsl} | 6 +-
.../templates/pdf/{regions.xsl => regions_png.xsl} | 0
.../sandbox/arthur/xml_transform/xml_transform.cc | 113 +++++---
.../sandbox/arthur/xml_transform/xml_transform.hh | 20 +-
.../sandbox/arthur/xml_transform/xml_transform.pro | 12 +-
21 files changed, 564 insertions(+), 685 deletions(-)
create mode 100644 scribo/sandbox/arthur/xml_transform/common.cc
create mode 100644 scribo/sandbox/arthur/xml_transform/common.hh
delete mode 100644 scribo/sandbox/arthur/xml_transform/domitem.cc
delete mode 100644 scribo/sandbox/arthur/xml_transform/domitem.hh
delete mode 100644 scribo/sandbox/arthur/xml_transform/dommodel.cc
delete mode 100644 scribo/sandbox/arthur/xml_transform/dommodel.hh
copy scribo/sandbox/arthur/xml_transform/templates/html/{xsl.xsl => xsl_base64.xsl} (97%)
copy scribo/sandbox/arthur/xml_transform/templates/pdf/{main.xsl => main64.xsl} (94%)
copy scribo/sandbox/arthur/xml_transform/templates/pdf/{regions.xsl => regions_base64.xsl} (91%)
rename scribo/sandbox/arthur/xml_transform/templates/pdf/{regions.xsl => regions_png.xsl} (100%)
hooks/post-receive
--
Olena, a generic and efficient image processing platform
1
0
* scribo/sandbox/arthur/xml_transform/xml_transform.cc,
* scribo/sandbox/arthur/xml_transform/xml_transform.hh: Facade.
* scribo/sandbox/arthur/xml_transform/image_crop.cc,
* scribo/sandbox/arthur/xml_transform/image_crop.hh: Image process.
* scribo/sandbox/arthur/xml_transform/loader.cc,
* scribo/sandbox/arthur/xml_transform/loader.hh: XML loader.
* scribo/sandbox/arthur/xml_transform/main.cc
* scribo/sandbox/arthur/xml_transform/templates/html/xsl.xsl
* scribo/sandbox/arthur/xml_transform/xml_transform.pro
* scribo/sandbox/arthur/xml_transform/README
* scribo/sandbox/arthur/xml_transform/common.cc,
* scribo/sandbox/arthur/xml_transform/common.hh,
* scribo/sandbox/arthur/xml_transform/moc_dommodel.cpp,
* scribo/sandbox/arthur/xml_transform/templates/html/xsl_base64.xsl,
* scribo/sandbox/arthur/xml_transform/templates/pdf/main64.xsl,
* scribo/sandbox/arthur/xml_transform/templates/pdf/regions_base64.xsl: New.
* scribo/sandbox/arthur/xml_transform/domitem.cc,
* scribo/sandbox/arthur/xml_transform/domitem.hh,
* scribo/sandbox/arthur/xml_transform/dommodel.cc,
* scribo/sandbox/arthur/xml_transform/dommodel.hh: Delete.
* scribo/sandbox/arthur/xml_transform/templates/pdf/regions.xsl: Rename as...
* scribo/sandbox/arthur/xml_transform/templates/pdf/regions_png.xsl:...this.
---
scribo/sandbox/ChangeLog | 33 +++
scribo/sandbox/arthur/xml_transform/README | 25 +-
scribo/sandbox/arthur/xml_transform/common.cc | 13 +
scribo/sandbox/arthur/xml_transform/common.hh | 16 +
scribo/sandbox/arthur/xml_transform/domitem.cc | 98 -------
scribo/sandbox/arthur/xml_transform/domitem.hh | 75 -----
scribo/sandbox/arthur/xml_transform/dommodel.cc | 198 -------------
scribo/sandbox/arthur/xml_transform/dommodel.hh | 85 ------
scribo/sandbox/arthur/xml_transform/image_crop.cc | 303 ++++++++++++++------
scribo/sandbox/arthur/xml_transform/image_crop.hh | 19 +-
scribo/sandbox/arthur/xml_transform/loader.cc | 124 +++++----
scribo/sandbox/arthur/xml_transform/loader.hh | 17 +-
scribo/sandbox/arthur/xml_transform/main.cc | 78 +++++-
.../arthur/xml_transform/templates/html/xsl.xsl | 3 +-
.../templates/html/{xsl.xsl => xsl_base64.xsl} | 9 +-
.../templates/pdf/{main.xsl => main64.xsl} | 2 +-
.../pdf/{regions.xsl => regions_base64.xsl} | 6 +-
.../templates/pdf/{regions.xsl => regions_png.xsl} | 0
.../sandbox/arthur/xml_transform/xml_transform.cc | 113 +++++---
.../sandbox/arthur/xml_transform/xml_transform.hh | 20 +-
.../sandbox/arthur/xml_transform/xml_transform.pro | 12 +-
21 files changed, 564 insertions(+), 685 deletions(-)
create mode 100644 scribo/sandbox/arthur/xml_transform/common.cc
create mode 100644 scribo/sandbox/arthur/xml_transform/common.hh
delete mode 100644 scribo/sandbox/arthur/xml_transform/domitem.cc
delete mode 100644 scribo/sandbox/arthur/xml_transform/domitem.hh
delete mode 100644 scribo/sandbox/arthur/xml_transform/dommodel.cc
delete mode 100644 scribo/sandbox/arthur/xml_transform/dommodel.hh
copy scribo/sandbox/arthur/xml_transform/templates/html/{xsl.xsl => xsl_base64.xsl} (97%)
copy scribo/sandbox/arthur/xml_transform/templates/pdf/{main.xsl => main64.xsl} (94%)
copy scribo/sandbox/arthur/xml_transform/templates/pdf/{regions.xsl => regions_base64.xsl} (91%)
rename scribo/sandbox/arthur/xml_transform/templates/pdf/{regions.xsl => regions_png.xsl} (100%)
diff --git a/scribo/sandbox/ChangeLog b/scribo/sandbox/ChangeLog
index d3f537b..0fb733f 100644
--- a/scribo/sandbox/ChangeLog
+++ b/scribo/sandbox/ChangeLog
@@ -1,3 +1,36 @@
+2010-07-15 Arthur Crepin-Leblond <crepin(a)stockholm.lrde.epita.fr>
+
+ XML Tranform.
+
+ * scribo/sandbox/arthur/xml_transform/xml_transform.cc,
+ * scribo/sandbox/arthur/xml_transform/xml_transform.hh: Facade.
+
+ * scribo/sandbox/arthur/xml_transform/image_crop.cc,
+ * scribo/sandbox/arthur/xml_transform/image_crop.hh: Image process.
+
+ * scribo/sandbox/arthur/xml_transform/loader.cc,
+ * scribo/sandbox/arthur/xml_transform/loader.hh: XML loader.
+
+ * scribo/sandbox/arthur/xml_transform/main.cc
+ * scribo/sandbox/arthur/xml_transform/templates/html/xsl.xsl
+ * scribo/sandbox/arthur/xml_transform/xml_transform.pro
+ * scribo/sandbox/arthur/xml_transform/README
+
+ * scribo/sandbox/arthur/xml_transform/common.cc,
+ * scribo/sandbox/arthur/xml_transform/common.hh,
+ * scribo/sandbox/arthur/xml_transform/templates/html/xsl_base64.xsl,
+ * scribo/sandbox/arthur/xml_transform/templates/pdf/main64.xsl,
+ * scribo/sandbox/arthur/xml_transform/templates/pdf/regions_base64.xsl: New.
+
+ * scribo/sandbox/arthur/xml_transform/domitem.cc,
+ * scribo/sandbox/arthur/xml_transform/domitem.hh,
+ * scribo/sandbox/arthur/xml_transform/dommodel.cc,
+ * scribo/sandbox/arthur/xml_transform/dommodel.hh: Delete.
+
+ * scribo/sandbox/arthur/xml_transform/templates/pdf/regions.xsl: Rename as...
+ * scribo/sandbox/arthur/xml_transform/templates/pdf/regions_png.xsl:...this.
+
+
2010-07-05 Arthur Crepin-Leblond <crepin(a)stockholm.lrde.epita.fr>
ICDAR XML to HTML.
diff --git a/scribo/sandbox/arthur/xml_transform/README b/scribo/sandbox/arthur/xml_transform/README
index e0bfbc8..1f358e3 100644
--- a/scribo/sandbox/arthur/xml_transform/README
+++ b/scribo/sandbox/arthur/xml_transform/README
@@ -1,19 +1,24 @@
-xml_transform <option> <xml_file> <ppm_file> <output_dir>
-
-Transforms an ICDAR XML file to different kind of output.
+xml_transform
OPTIONS:
- --html: Produce a HTML output
-
-Once process is finished, open output.xml with your internet browser. If this one supports XSLT, there is no problem to display the result but if it does not support it (like Konqueror or Chrome in local), you should run `sh html_generator.sh` (xsltproc package required) to generate a HTML file readable by all browsers.
+HTML output:
+ --html <xml> <ppm> <out_dir> : HTML output with non-text regions croped into many png files.
+ --html-base64 <xml> <out_dir> : HTML output from a container XML file.
- --pdf: Produce a PDF output, regions will be cropped as follows in the XML file.
- --pdf-no-crop: Produce a PDF output without cropping regions, the entire picture will be displayed.
+PDF output:
+ --pdf <xml> <ppm> <out_dir> : PDF output with non-text regions croped into many png files.
+ --pdf-no-crop <xml> <ppm> <out_dir>: PDF output with the entire picture displayed over the text.
+ --pdf-base64 <xml> <out_dir> : PDF output from a container XML file.
+ --pdf-base64-no-crop <xml> <ppm> <out_dir> : PDF with the entire picture displayed over the text,
+ the picture is loaded from a container XML file.
-PDF is not directly created once the process is finished, to produce it, go to the output_dir and run `sh pdf_generator.sh` (fop >= 0.95 required).
+Base 64 operations:
+ --to-base64 <xml> <ppm> <out_xml> : Produces a container XML file by converting croped pictures into base 64 format.
+ --to-base64-no-crop <xml> <ppm> <out_xml> : Same as to-base64 but only the picture is converted in base 64.
+ --from-base64 <xml> <out_dir> : Decodes a XML container file to produce original image files.
BUILD:
-Chnage the environment variable QMAKE_CXXFLAGS to indicate the correct paths to milena and olena then, just type qmake and make.
\ No newline at end of file
+Chnage the environment variable QMAKE_CXXFLAGS to indicate the correct paths to milena and olena in the .pro file then, just type qmake and make.
\ No newline at end of file
diff --git a/scribo/sandbox/arthur/xml_transform/common.cc b/scribo/sandbox/arthur/xml_transform/common.cc
new file mode 100644
index 0000000..05117b2
--- /dev/null
+++ b/scribo/sandbox/arthur/xml_transform/common.cc
@@ -0,0 +1,13 @@
+# include "common.hh"
+
+QString Common::get_file_name(QString image)
+{
+ QString tmp = image.mid(image.lastIndexOf("/") + 1);
+ tmp.chop(tmp.size() - tmp.lastIndexOf("."));
+ return tmp;
+}
+
+QString Common::get_file_ext(QString image)
+{
+ return image.right(image.size() - image.lastIndexOf("."));
+}
diff --git a/scribo/sandbox/arthur/xml_transform/common.hh b/scribo/sandbox/arthur/xml_transform/common.hh
new file mode 100644
index 0000000..f72218f
--- /dev/null
+++ b/scribo/sandbox/arthur/xml_transform/common.hh
@@ -0,0 +1,16 @@
+#ifndef COMMON_HH
+# define COMMON_HH
+
+# include <QtGui>
+
+class Common : public QObject
+{
+ Q_OBJECT
+public:
+ Common() {}
+ ~Common() {}
+ static QString get_file_name(QString image);
+ static QString get_file_ext(QString image);
+};
+
+#endif // ! COMMON_HH
diff --git a/scribo/sandbox/arthur/xml_transform/domitem.cc b/scribo/sandbox/arthur/xml_transform/domitem.cc
deleted file mode 100644
index 66e989a..0000000
--- a/scribo/sandbox/arthur/xml_transform/domitem.cc
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************************
- **
- ** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
- ** Contact: Qt Software Information (qt-info(a)nokia.com)
- **
- ** This file is part of the example classes of the Qt Toolkit.
- **
- ** Commercial Usage
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
- **
- **
- ** GNU General Public License Usage
- ** Alternatively, this file may be used under the terms of the GNU
- ** General Public License versions 2.0 or 3.0 as published by the Free
- ** Software Foundation and appearing in the file LICENSE.GPL included in
- ** the packaging of this file. Please review the following information
- ** to ensure GNU General Public Licensing requirements will be met:
- ** http://www.fsf.org/licensing/licenses/info/GPLv2.html and
- ** http://www.gnu.org/copyleft/gpl.html. In addition, as a special
- ** exception, Nokia gives you certain additional rights. These rights
- ** are described in the Nokia Qt GPL Exception version 1.3, included in
- ** the file GPL_EXCEPTION.txt in this package.
- **
- ** Qt for Windows(R) Licensees
- ** As a special exception, Nokia, as the sole copyright holder for Qt
- ** Designer, grants users of the Qt/Eclipse Integration plug-in the
- ** right for the Qt/Eclipse Integration to link to functionality
- ** provided by Qt Designer and its related libraries.
- **
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at qt-sales(a)nokia.com.
- **
- ****************************************************************************/
-
-//
-// Document layout viewer.
-//
-// Copyright (C) 2009 Florent D'Halluin.
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// The complete GNU General Public Licence Notice can be found as the
-// `COPYING' file in the root directory.
-//
-
-#include <QtXml>
-
-#include "domitem.hh"
-
-DomItem::DomItem(QDomNode &node, int row, DomItem *parent)
-{
- domNode = node;
- // Record the item's location within its parent.
- rowNumber = row;
- parentItem = parent;
-}
-
-DomItem::~DomItem()
-{
- QHash<int,DomItem*>::iterator it;
- for (it = childItems.begin(); it != childItems.end(); ++it)
- delete it.value();
-}
-
-QDomNode DomItem::node() const
-{
- return domNode;
-}
-
-DomItem *DomItem::parent()
-{
- return parentItem;
-}
-
-DomItem *DomItem::child(int i)
-{
- if (childItems.contains(i))
- return childItems[i];
-
- if (i >= 0 && i < domNode.childNodes().count()) {
- QDomNode childNode = domNode.childNodes().item(i);
- DomItem *childItem = new DomItem(childNode, i, this);
- childItems[i] = childItem;
- return childItem;
- }
- return 0;
-}
-
-int DomItem::row()
-{
- return rowNumber;
-}
diff --git a/scribo/sandbox/arthur/xml_transform/domitem.hh b/scribo/sandbox/arthur/xml_transform/domitem.hh
deleted file mode 100644
index a5c22cc..0000000
--- a/scribo/sandbox/arthur/xml_transform/domitem.hh
+++ /dev/null
@@ -1,75 +0,0 @@
- /****************************************************************************
- **
- ** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
- ** Contact: Qt Software Information (qt-info(a)nokia.com)
- **
- ** This file is part of the example classes of the Qt Toolkit.
- **
- ** Commercial Usage
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
- **
- **
- ** GNU General Public License Usage
- ** Alternatively, this file may be used under the terms of the GNU
- ** General Public License versions 2.0 or 3.0 as published by the Free
- ** Software Foundation and appearing in the file LICENSE.GPL included in
- ** the packaging of this file. Please review the following information
- ** to ensure GNU General Public Licensing requirements will be met:
- ** http://www.fsf.org/licensing/licenses/info/GPLv2.html and
- ** http://www.gnu.org/copyleft/gpl.html. In addition, as a special
- ** exception, Nokia gives you certain additional rights. These rights
- ** are described in the Nokia Qt GPL Exception version 1.3, included in
- ** the file GPL_EXCEPTION.txt in this package.
- **
- ** Qt for Windows(R) Licensees
- ** As a special exception, Nokia, as the sole copyright holder for Qt
- ** Designer, grants users of the Qt/Eclipse Integration plug-in the
- ** right for the Qt/Eclipse Integration to link to functionality
- ** provided by Qt Designer and its related libraries.
- **
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at qt-sales(a)nokia.com.
- **
- ****************************************************************************/
-
-//
-// Document layout viewer.
-//
-// Copyright (C) 2009 Florent D'Halluin.
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// The complete GNU General Public Licence Notice can be found as the
-// `COPYING' file in the root directory.
-//
-
-#ifndef DOMITEM_H
-#define DOMITEM_H
-
-#include <QDomNode>
-#include <QHash>
-
-class DomItem
-{
-public:
- DomItem(QDomNode &node, int row, DomItem *parent = 0);
- ~DomItem();
- DomItem *child(int i);
- DomItem *parent();
- QDomNode node() const;
- int row();
-
-private:
- QDomNode domNode;
- QHash<int,DomItem*> childItems;
- DomItem *parentItem;
- int rowNumber;
-};
-
-#endif
diff --git a/scribo/sandbox/arthur/xml_transform/dommodel.cc b/scribo/sandbox/arthur/xml_transform/dommodel.cc
deleted file mode 100644
index baaf9a7..0000000
--- a/scribo/sandbox/arthur/xml_transform/dommodel.cc
+++ /dev/null
@@ -1,198 +0,0 @@
-/****************************************************************************
- **
- ** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
- ** Contact: Qt Software Information (qt-info(a)nokia.com)
- **
- ** This file is part of the example classes of the Qt Toolkit.
- **
- ** Commercial Usage
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
- **
- **
- ** GNU General Public License Usage
- ** Alternatively, this file may be used under the terms of the GNU
- ** General Public License versions 2.0 or 3.0 as published by the Free
- ** Software Foundation and appearing in the file LICENSE.GPL included in
- ** the packaging of this file. Please review the following information
- ** to ensure GNU General Public Licensing requirements will be met:
- ** http://www.fsf.org/licensing/licenses/info/GPLv2.html and
- ** http://www.gnu.org/copyleft/gpl.html. In addition, as a special
- ** exception, Nokia gives you certain additional rights. These rights
- ** are described in the Nokia Qt GPL Exception version 1.3, included in
- ** the file GPL_EXCEPTION.txt in this package.
- **
- ** Qt for Windows(R) Licensees
- ** As a special exception, Nokia, as the sole copyright holder for Qt
- ** Designer, grants users of the Qt/Eclipse Integration plug-in the
- ** right for the Qt/Eclipse Integration to link to functionality
- ** provided by Qt Designer and its related libraries.
- **
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at qt-sales(a)nokia.com.
- **
- ****************************************************************************/
-
-//
-// Document layout viewer.
-//
-// Copyright (C) 2009 Florent D'Halluin.
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// The complete GNU General Public Licence Notice can be found as the
-// `COPYING' file in the root directory.
-//
-
-#include <QtGui>
-#include <QtXml>
-
-#include "domitem.hh"
-#include "dommodel.hh"
-
-DomModel::DomModel(QDomDocument document, QObject *parent)
- : QAbstractItemModel(parent), domDocument(document)
-{
- rootItem = new DomItem(domDocument, 0);
-}
-
-DomModel::~DomModel()
-{
- delete rootItem;
-}
-
-int DomModel::columnCount(const QModelIndex &/*parent*/) const
-{
- return 3;
-}
-
-QVariant DomModel::data(const QModelIndex &index, int role) const
-{
- if (!index.isValid())
- return QVariant();
-
- DomItem *item = static_cast<DomItem*>(index.internalPointer());
- QDomNode node = item->node();
- QDomNamedNodeMap attributeMap = node.attributes();
-
- if (role == Qt::DisplayRole)
- {
- QStringList attributes;
-
- switch (index.column())
- {
- case 0:
- return node.nodeName();
- case 1:
- for (int i = 0; i < attributeMap.count(); ++i)
- {
- QDomNode attribute = attributeMap.item(i);
- attributes << attribute.nodeName() + "=\""
- + attribute.nodeValue() + "\"";
- }
- return attributes.join(" ");
- case 2:
- return node.nodeValue().split("\n").join(" ");
- default:
- return QVariant();
- }
- }
- else if (role == Qt::UserRole)
- {
- QMap<QString, QVariant> attributes;
- switch (index.column())
- {
- case 1:
- for (int i = 0; i < attributeMap.count(); ++i)
- {
- QDomNode attribute = attributeMap.item(i);
- attributes[attribute.nodeName()] = attribute.nodeValue();
- }
- return attributes;
- default:
- return QVariant();
- }
- }
- return QVariant();
-}
-
-Qt::ItemFlags DomModel::flags(const QModelIndex &index) const
-{
- if (!index.isValid())
- return 0;
-
- return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
-}
-
-QVariant DomModel::headerData(int section, Qt::Orientation orientation,
- int role) const
-{
- if (orientation == Qt::Horizontal && role == Qt::DisplayRole) {
- switch (section) {
- case 0:
- return tr("Name");
- case 1:
- return tr("Attributes");
- case 2:
- return tr("Value");
- default:
- return QVariant();
- }
- }
-
- return QVariant();
-}
-
-QModelIndex DomModel::index(int row, int column, const QModelIndex &parent)
- const
-{
- if (!hasIndex(row, column, parent))
- return QModelIndex();
-
- DomItem *parentItem;
-
- if (!parent.isValid())
- parentItem = rootItem;
- else
- parentItem = static_cast<DomItem*>(parent.internalPointer());
-
- DomItem *childItem = parentItem->child(row);
- if (childItem)
- return createIndex(row, column, childItem);
- else
- return QModelIndex();
-}
-
-QModelIndex DomModel::parent(const QModelIndex &child) const
-{
- if (!child.isValid())
- return QModelIndex();
-
- DomItem *childItem = static_cast<DomItem*>(child.internalPointer());
- DomItem *parentItem = childItem->parent();
-
- if (!parentItem || parentItem == rootItem)
- return QModelIndex();
-
- return createIndex(parentItem->row(), 0, parentItem);
-}
-
-int DomModel::rowCount(const QModelIndex &parent) const
-{
- if (parent.column() > 0)
- return 0;
-
- DomItem *parentItem;
-
- if (!parent.isValid())
- parentItem = rootItem;
- else
- parentItem = static_cast<DomItem*>(parent.internalPointer());
-
- return parentItem->node().childNodes().count();
-}
diff --git a/scribo/sandbox/arthur/xml_transform/dommodel.hh b/scribo/sandbox/arthur/xml_transform/dommodel.hh
deleted file mode 100644
index 16c5a23..0000000
--- a/scribo/sandbox/arthur/xml_transform/dommodel.hh
+++ /dev/null
@@ -1,85 +0,0 @@
-/****************************************************************************
- **
- ** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
- ** Contact: Qt Software Information (qt-info(a)nokia.com)
- **
- ** This file is part of the example classes of the Qt Toolkit.
- **
- ** Commercial Usage
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
- **
- **
- ** GNU General Public License Usage
- ** Alternatively, this file may be used under the terms of the GNU
- ** General Public License versions 2.0 or 3.0 as published by the Free
- ** Software Foundation and appearing in the file LICENSE.GPL included in
- ** the packaging of this file. Please review the following information
- ** to ensure GNU General Public Licensing requirements will be met:
- ** http://www.fsf.org/licensing/licenses/info/GPLv2.html and
- ** http://www.gnu.org/copyleft/gpl.html. In addition, as a special
- ** exception, Nokia gives you certain additional rights. These rights
- ** are described in the Nokia Qt GPL Exception version 1.3, included in
- ** the file GPL_EXCEPTION.txt in this package.
- **
- ** Qt for Windows(R) Licensees
- ** As a special exception, Nokia, as the sole copyright holder for Qt
- ** Designer, grants users of the Qt/Eclipse Integration plug-in the
- ** right for the Qt/Eclipse Integration to link to functionality
- ** provided by Qt Designer and its related libraries.
- **
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at qt-sales(a)nokia.com.
- **
- ****************************************************************************/
-
-//
-// Document layout viewer.
-//
-// Copyright (C) 2009 Florent D'Halluin.
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// The complete GNU General Public Licence Notice can be found as the
-// `COPYING' file in the root directory.
-//
-
-#ifndef DOMMODEL_H
-#define DOMMODEL_H
-
-#include <QAbstractItemModel>
-#include <QDomDocument>
-#include <QModelIndex>
-#include <QVariant>
-
-class DomItem;
-
-class DomModel : public QAbstractItemModel
-{
- Q_OBJECT
-
- public:
- DomModel(QDomDocument document, QObject *parent = 0);
- ~DomModel();
-
- QVariant data(const QModelIndex &index, int role) const;
- Qt::ItemFlags flags(const QModelIndex &index) const;
- QVariant headerData(int section, Qt::Orientation orientation,
- int role = Qt::DisplayRole) const;
- QModelIndex index(int row, int column,
- const QModelIndex &parent = QModelIndex()) const;
- QModelIndex parent(const QModelIndex &child) const;
- int rowCount(const QModelIndex &parent = QModelIndex()) const;
- int columnCount(const QModelIndex &parent = QModelIndex()) const;
-
-private:
- QDomDocument domDocument;
- DomItem *rootItem;
-};
-
-#endif
diff --git a/scribo/sandbox/arthur/xml_transform/image_crop.cc b/scribo/sandbox/arthur/xml_transform/image_crop.cc
index aa17c31..8aafe45 100644
--- a/scribo/sandbox/arthur/xml_transform/image_crop.cc
+++ b/scribo/sandbox/arthur/xml_transform/image_crop.cc
@@ -25,7 +25,7 @@
# include "image_crop.hh"
# include "loader.hh"
-# include "dommodel.hh"
+# include "common.hh"
# include <limits.h>
@@ -36,7 +36,10 @@
#include <mln/io/magick/save.hh>
#include <mln/io/ppm/all.hh>
-ImageCrop::ImageCrop()
+ImageCrop::ImageCrop(QString xml, QString img, QString output) :
+ xml_(xml),
+ image_(img),
+ output_dir_(output)
{
}
@@ -44,95 +47,242 @@ ImageCrop::~ImageCrop()
{
}
-void ImageCrop::save_image(QString image, QString output)
+/* Save PPM image to PNG format in output_dir/img. */
+void ImageCrop::save_image(QString file)
{
using namespace mln;
image2d<value::rgb8> ima;
- io::ppm::load(ima, image.toStdString());
+ io::ppm::load(ima, image_.toStdString());
- io::magick::save(ima, output.toStdString() + "img/image.png");
+ QString filename;
+ if (file == QString::Null())
+ filename = Common::get_file_name(image_);
+ else
+ filename = file;
+
+ std::cout << "Saving " << image_.toStdString() << " to "
+ << output_dir_.toStdString() << "img/"
+ << filename.toStdString() << ".png"
+ << std::endl;
+
+ io::magick::save(ima, output_dir_.toStdString() + "img/" + filename.toStdString() + ".png");
}
-void ImageCrop::crop_regions(QString xml_file, QString image_file, QString output)
+/* Return the image in base 64. */
+QString ImageCrop::img_to_base64()
{
- Loader loader;
+ QFile f(image_);
+ f.open(QIODevice::ReadOnly);
+
+ QByteArray file_content = f.readAll();
- QFile f(image_file);
+ f.close();
- if (!f.exists())
+ return file_content.toBase64();
+}
+
+/* Decode the base 64 string str and save into output_dir_/img/img_name. */
+bool ImageCrop::img_from_base64(QString str, QString img_name, QString mime)
+{
+ QByteArray ba;
+
+ ba = ba.append(str);
+ QByteArray out_ba = QByteArray::fromBase64(ba);
+ QImage ima = QImage::fromData(out_ba);
+
+ return ima.save(output_dir_ + "img/" + img_name + "." + mime);
+}
+
+/* Read all regions of the XML file and save all base 64 data into output_dir/img */
+void ImageCrop::from_base64()
+{
+ QFile f_in(xml_);
+ f_in.open(QIODevice::ReadOnly);
+
+ QDomDocument doc;
+ doc.setContent(&f_in);
+ f_in.close();
+
+ QDomElement root = doc.documentElement();
+ QDomNode child = root.firstChild();
+
+ while (!child.isNull() && !child.toElement().tagName().contains("page"))
+ child = child.nextSibling();
+
+ child = child.firstChild();
+ while (!child.isNull())
{
- qDebug() << "Image doesn't exist !";
- abort();
+ if (child.toElement().tagName().contains(QRegExp("(image|graphic|chart|separator|table)_region")))
+ {
+ QDomNode node = child.firstChild();
+ QString id = child.toElement().attribute("id", "none");
+
+ while (!node.isNull() && !node.toElement().tagName().contains("container"))
+ node = node.nextSibling();
+
+ if (!node.isNull())
+ {
+ QString data = node.firstChildElement("data").text();
+ QString mime = node.firstChildElement("mime").text();
+ img_from_base64(data, id, mime);
+ }
+ }
+ child = child.nextSibling();
+ }
+}
+
+/* Tranfsorm the input XML file associated with images into a single
+ XML output containing datas if images in base 64. */
+void ImageCrop::to_base64(QString out_file, bool no_crop)
+{
+ QFile file(xml_);
+ file.open(QIODevice::ReadOnly);
+ QTextStream stream(&file);
+
+ QFile file2(out_file);
+ file2.open(QIODevice::ReadWrite);
+ QTextStream stream2(&file2);
+
+ QString line = stream.readLine();
+ stream2 << line;
+ line = stream.readLine();
+
+ // HEAD
+ while (!line.contains("<page"))
+ {
+ stream2 << "\n" << line;
+ line = stream.readLine();
+ }
+
+ if (no_crop)
+ {
+ stream2 << "\n" << line;
+
+ stream2 << "\n" << " <image_region id=\"image\">";
+ stream2 << "\n" << " <container>\n";
+ stream2 << " <mime>png</mime>\n";
+
+ QString file_name = Common::get_file_name(image_);
+ save_image();
+ QFile img(output_dir_ + "img/" + file_name + ".png");
+
+ img.open(QIODevice::ReadOnly);
+ stream2 << " <data>\n";
+
+ QByteArray byte = img.readAll();
+ stream2 << byte.toBase64();
+
+ stream2 << " </data>";
+ stream2 << "\n </container>";
+ stream2 << "\n <coords>\n";
+
+ stream2 << " <point x=\"0\" y=\"0\" />\n";
+ stream2 << " <point x=\"0\" y=\"0\" />";
+
+ stream2 << "\n </coords>";
+ stream2 << "\n" << " </image_region>\n";
+ img.close();
+
+ line = stream.readLine();
+
+ while(!line.contains("</pcGts>"))
+ {
+ stream2 << "\n" << line;
+ line = stream.readLine();
+ }
+
+ stream2 << "\n" << line;
}
- DomModel* layout = loader.xml_to_dom(xml_file);
- if (layout)
+ else
{
- QModelIndex pcGts = layout->index(1, 0);
- QModelIndex page = layout->index(1, 0, pcGts);
- QModelIndex region;
- QModelIndex attributes;
- QModelIndex coords;
- QModelIndex point;
- bool regions_found = false;
-
- for (int i = 0; true; ++i)
+ while(!line.contains("</pcGts>"))
{
- region = layout->index(i, 0, page);
- attributes = layout->index(i, 1, page);
+ stream2 << "\n" << line;
+ if (line.contains(QRegExp("<(image|graphic|chart|separator|table)_region")))
+ {
+ stream2 << "\n" << " <container>\n";
+ stream2 << " <mime>png</mime>\n";
+
+ QDomDocument doc;
+ doc.setContent(line);
+
+ QDomElement root = doc.documentElement();
+ QString id = root.attribute("id", "none");
- QString name = layout->data(region, Qt::DisplayRole).toString();
- coords = layout->index(0, 0, region);
+ QFile img(output_dir_ + "img/" + id + ".png");
- bool is_region =
- name == QString("image_region")
- || name == QString("graphic_region")
- || name == QString("separator_region")
- || name == QString("chart_region")
- || name == QString("table_region") ;
+ img.open(QIODevice::ReadOnly);
+ stream2 << " <data>\n";
- if (!region.isValid() || !coords.isValid())
- break;
+ QByteArray byte = img.readAll();
+ stream2 << byte.toBase64();
+
+ stream2 << " </data>";
+ stream2 << "\n </container>";
+ img.close();
+ }
- if (is_region)
+ line = stream.readLine();
+ }
+
+ stream2 << "\n" << line;
+ }
+
+ file2.close();
+ file.close();
+}
+
+bool ImageCrop::crop_regions()
+{
+ Loader loader;
+ QFile f(xml_);
+ f.open(QIODevice::ReadOnly);
+ QDomDocument doc;
+
+ if (doc.setContent(&f))
+ {
+ bool found_regions = false;
+ f.close();
+
+ QDomElement root = doc.documentElement();
+ QDomNode page = root.firstChild();
+
+ while (!page.isNull() && !page.toElement().tagName().contains("page"))
+ page = page.nextSibling();
+
+ if (page.isNull())
+ return false;
+
+ QDomNode region = page.firstChild();
+
+ while (!region.isNull())
+ {
+ if (region.toElement().tagName().contains(QRegExp("(image|graphic|chart|separator|table)_region")))
{
- regions_found = true;
- QMap<QString, QVariant> data =
- layout->data(attributes, Qt::UserRole).toMap();
+ found_regions = true;
- QString id;
- QMap<QString, QVariant>::iterator it = data.find("id");
+ QDomNode coords = region.firstChild();
+ QString id = region.toElement().attribute("id", "none");
- if (it == data.end() || it.key() != "id")
- qDebug() << "WTF_Error : No image region.";
+ qDebug() << region.toElement().tagName();
- while (it != data.end() && it.key() == "id")
- {
- qDebug() << name;
- id = it.value().toString();
- qDebug() << it.key() + " = " + it.value().toString();
- ++it;
- }
+ while (!coords.isNull() && !coords.toElement().tagName().contains("coords"))
+ coords = coords.nextSibling();
+ if (coords.isNull())
+ break;
+
+ QDomNode point = coords.firstChild();
int x_max = 0;
int y_max = 0;
int x_min = INT_MAX;
int y_min = INT_MAX;
- // QVector<QMap<QString, QVariant> > vect;
- for (int j = 0; true; ++j)
+ while (!point.isNull())
{
- // Navigate to the coordinate list
- point = layout->index(j, 1, coords);
- if (!point.isValid())
- break;
-
- QMap<QString, QVariant> data =
- layout->data(point, Qt::UserRole).toMap();
- int x = data["x"].toInt();
- int y = data["y"].toInt();
-
- // vect << data;
+ int x = point.toElement().attribute("x", "none").toInt();
+ int y = point.toElement().attribute("y", "none").toInt();
if (x < x_min)
x_min = x;
@@ -144,41 +294,26 @@ void ImageCrop::crop_regions(QString xml_file, QString image_file, QString outpu
if (y > y_max)
y_max = y;
+ point = point.nextSibling();
}
using namespace mln;
-
box2d box = make::box2d(y_min, x_min, y_max, x_max);
image2d<value::rgb8> ima;
- io::ppm::load(ima, image_file.toStdString());
+ io::ppm::load(ima, image_.toStdString());
ima = scribo::preprocessing::crop(ima, box);
- // image2d<bool> mask = make::box2d(y_min, x_min, y_max, x_max);
- // data::fill(mask, true);
-
- /*for (int a = 1; a < vect.size(); ++a)
- {
- int x = vect[a]["x"].toInt();
- int y = vect[a]["y"].toInt();
-
- data::fill((mask | make::box2d(y, x, y, x)).rw(), false);
- }*/
-
- // io::pbm::save(mask, "output/img/mask_" + id.toStdString());
- io::magick::save(ima, output.toStdString() + "img/" + id.toStdString() + ".png");
-
+ io::magick::save(ima, output_dir_.toStdString() + "img/" + id.toStdString() + ".png");
}
+ region = region.nextSibling();
}
- if (!regions_found)
- qDebug() << "No regions found.";
-
+ return found_regions;
}
else
{
- qDebug() << "Error with XML file.";
+ f.close();
+ return false;
}
-
-
}
diff --git a/scribo/sandbox/arthur/xml_transform/image_crop.hh b/scribo/sandbox/arthur/xml_transform/image_crop.hh
index e4b0a38..9b034cc 100644
--- a/scribo/sandbox/arthur/xml_transform/image_crop.hh
+++ b/scribo/sandbox/arthur/xml_transform/image_crop.hh
@@ -26,7 +26,8 @@
#ifndef IMAGE_CROP_HH
# define IMAGE_CROP_HH
-# include <QtGui>
+#include <QDomDocument>
+# include <QtCore>
class DomModel;
@@ -35,12 +36,22 @@ class ImageCrop : public QObject
Q_OBJECT
public:
- ImageCrop();
+ ImageCrop(QString xml, QString img, QString output);
~ImageCrop();
- void save_image(QString image, QString output);
- void crop_regions(QString xml_file, QString image_file, QString output);
+ void save_image(QString file = QString::Null());
+ bool crop_regions();
+ QString img_to_base64();
+ bool img_from_base64(QString str, QString img_name, QString mime);
+ void to_base64(QString out_file, bool no_crop);
+
+ void from_base64();
+
+private:
+ QString xml_;
+ QString image_;
+ QString output_dir_;
};
#endif /* !IMAGE_CROP_HH */
diff --git a/scribo/sandbox/arthur/xml_transform/loader.cc b/scribo/sandbox/arthur/xml_transform/loader.cc
index 5623928..2b64337 100644
--- a/scribo/sandbox/arthur/xml_transform/loader.cc
+++ b/scribo/sandbox/arthur/xml_transform/loader.cc
@@ -24,8 +24,6 @@
// executable file might be covered by the GNU General Public License.
# include "loader.hh"
-# include "dommodel.hh"
-# include "xml_transform.hh"
Loader::Loader()
{
@@ -35,21 +33,21 @@ Loader::~Loader()
{
}
-DomModel* Loader::xml_to_dom(QString output)
+QDomDocument* Loader::xml_to_dom(QString xml_file)
{
- QString file_path = output;
-
- QFile file(file_path);
+ QFile file(xml_file);
if (file.open(QIODevice::ReadOnly))
{
- QDomDocument document;
- if (document.setContent(&file))
+ QDomDocument* document = new QDomDocument;
+ if (document->setContent(&file))
{
- return new DomModel(document);
+ file.close();
+ return document;
}
}
+ file.close();
return 0;
}
@@ -61,9 +59,7 @@ bool Loader::set_output(QString& output)
output.append("/");
if (!dir.exists())
- {
- return dir.mkpath(".");
- }
+ return dir.mkpath(".");
else
{
QStringList list = dir.entryList(QDir::Writable | QDir::AllDirs);
@@ -72,25 +68,38 @@ bool Loader::set_output(QString& output)
}
-void Loader::add_html_templates(QString output)
+void Loader::add_html_templates(bool base64, QString output)
{
-
QFile gen("templates/html/html_generator.sh");
gen.copy(output + "html_generator.sh");
QFile css("templates/html/css.css");
css.copy(output + "css.css");
- QFile xsl("templates/html/xsl.xsl");
- xsl.copy(output + "xsl.xsl");
-
+ if (base64)
+ {
+ QFile xsl("templates/html/xsl_base64.xsl");
+ xsl.copy(output + "xsl.xsl");
+ }
+ else
+ {
+ QFile xsl("templates/html/xsl.xsl");
+ xsl.copy(output + "xsl.xsl");
+ }
}
-void Loader::add_pdf_templates(bool crop, QString output)
+void Loader::add_pdf_templates(bool crop, bool base64, QString output)
{
-
- QFile regions("templates/pdf/regions.xsl");
- regions.copy(output + "regions.xsl");
+ if (base64)
+ {
+ QFile regions("templates/pdf/regions_base64.xsl");
+ regions.copy(output + "regions.xsl");
+ }
+ else
+ {
+ QFile regions("templates/pdf/regions_png.xsl");
+ regions.copy(output + "regions.xsl");
+ }
QFile gen("templates/pdf/pdf_generator.sh");
gen.copy(output + "pdf_generator.sh");
@@ -104,59 +113,58 @@ void Loader::add_pdf_templates(bool crop, QString output)
}
else
{
- QFile xsl("templates/pdf/main.xsl");
- xsl.copy(output + "main.xsl");
+ if (base64)
+ {
+ QFile xsl("templates/pdf/main.xsl");
+ xsl.copy(output + "main.xsl");
+ }
+ else
+ {
+ QFile xsl("templates/pdf/main64.xsl");
+ xsl.copy(output + "main.xsl");
+ }
}
}
-bool Loader::load_xml(QString xml_file, bool html, QString output)
+bool Loader::xml_output(QString xml_file, bool html, QString output)
{
QFile file(xml_file);
- if (file.exists())
- {
- file.open(QIODevice::ReadOnly);
- set_output(output);
+ file.open(QIODevice::ReadOnly);
- QFile out_file(output + "output.xml");
- out_file.open(QIODevice::ReadWrite);
+ QFile out_file(output + "output.xml");
+ out_file.open(QIODevice::ReadWrite);
- QTextStream stream_in(&file);
- QTextStream stream_out(&out_file);
+ QTextStream stream_in(&file);
+ QTextStream stream_out(&out_file);
- QString line = stream_in.readLine();
+ QString line = stream_in.readLine();
- while(!line.contains("<?xml"))
- line = stream_in.readLine();
+ while(!line.contains("<?xml"))
+ line = stream_in.readLine();
- stream_out << line;
+ stream_out << line;
- if (html)
- stream_out << "\n<?xml-stylesheet type=\"text/xsl\" href=\"xsl.xsl\" ?>";
+ if (html)
+ stream_out << "\n<?xml-stylesheet type=\"text/xsl\" href=\"xsl.xsl\" ?>";
- // /!\ attributes of ICDAR PcGts removed.
- while(!line.contains("<pcGts"))
- line = stream_in.readLine();
+ // /!\ attributes of ICDAR PcGts removed.
+ while(!line.contains("<pcGts"))
+ line = stream_in.readLine();
- line = stream_in.readLine();
- stream_out << "\n<pcGts>";
-
- while (!line.contains("</pcGts>"))
- {
- stream_out << "\n" << line;
- line = stream_in.readLine();
- }
+ line = stream_in.readLine();
+ stream_out << "\n<pcGts>";
+ while (!line.contains("</pcGts>"))
+ {
stream_out << "\n" << line;
+ line = stream_in.readLine();
+ }
- file.close();
- out_file.close();
+ stream_out << "\n" << line;
- return true;
- }
- else
- {
- qDebug() << xml_file + " doesn't exist";
- return false;
- }
+ file.close();
+ out_file.close();
+
+ return true;
}
diff --git a/scribo/sandbox/arthur/xml_transform/loader.hh b/scribo/sandbox/arthur/xml_transform/loader.hh
index 7d24254..fadceed 100644
--- a/scribo/sandbox/arthur/xml_transform/loader.hh
+++ b/scribo/sandbox/arthur/xml_transform/loader.hh
@@ -26,24 +26,23 @@
#ifndef LOADER_HH
# define LOADER_HH
-//# include <QtGui>
-# include "xml_transform.hh"
+# include <QtCore>
+#include <QDomDocument>
-class DomModel;
-
-class Loader
+class Loader : public QObject
{
+ Q_OBJECT
public:
Loader();
~Loader();
// void merge(QString in, QString other, QString output = "output.xml");
- bool load_xml(QString xml_file, bool html, QString output);
- DomModel* xml_to_dom(QString output);
+ bool xml_output(QString xml_file, bool html, QString output);
+ QDomDocument* xml_to_dom(QString xml_file);
bool set_output(QString& output);
- void add_pdf_templates(bool crop, QString output);
- void add_html_templates(QString output);
+ void add_pdf_templates(bool crop, bool base64, QString output);
+ void add_html_templates(bool base64, QString output);
};
#endif /* !LOADER_HH */
diff --git a/scribo/sandbox/arthur/xml_transform/main.cc b/scribo/sandbox/arthur/xml_transform/main.cc
index 9e18cff..e097430 100644
--- a/scribo/sandbox/arthur/xml_transform/main.cc
+++ b/scribo/sandbox/arthur/xml_transform/main.cc
@@ -1,25 +1,89 @@
#include <iostream>
+#include <QDomDocument>
#include "xml_transform.hh"
int main(int argc, char **argv)
{
- std::string man = "xml_transform <option> <xml_file> <ppm_file> <output_dir>\nOPTIONS:\n\t--html: Produce a HTML output\n\t--pdf: Produce a PDF output, regions will be croped as follows in the XML file.\n\t--pdf-no-crop: Produce a PDF output without croping regions, the entire picture will be displayed.";
+ std::string man;
+ man = "xml_transform\n";
+ man += "OPTIONS:\n\n";
+ man += "HTML output:\n";
+ man += "\t--html <xml> <ppm> <out_dir> : HTML output with non-text regions croped into many png files.\n";
+ man += "\t--html-base64 <xml> <out_dir> : HTML output from a container XML file.\n\n";
+ man += "PDF output:\n";
+ man += "\t--pdf <xml> <ppm> <out_dir> : PDF output with non-text regions croped into many png files.\n";
+ man += "\t--pdf-no-crop <xml> <ppm> <out_dir>: PDF output with the entire picture displayed over the text.\n";
+ man += "\t--pdf-base64 <xml> <out_dir> : PDF output from a container XML file.\n";
+ man += "\t--pdf-base64-no-crop <xml> <ppm> <out_dir> : PDF with the entire picture displayed over the text, the picture is loaded from a container XML file.\n\n";
+ man += "Base 64 operations:\n";
+ man += "\t--to-base64 <xml> <ppm> <out_xml> : Produces a container XML file by converting croped pictures into base 64 format.\n";
+ man += "\t--to-base64-no-crop <xml> <ppm> <out_xml> : Same as to-base64 but only the picture is converted in base 64.\n";
+ man += "\t--from-base64 <xml> <out_dir> : Decodes a XML container file to produce original image files.\n";
if (argc > 4)
{
std::string html = "--html";
std::string pdf = "--pdf";
std::string pdf_no_crop = "--pdf-no-crop";
-
- XmlTransform xmlt(argv[4], argv[2]);
+ std::string to_base64 = "--to-base64";
+ std::string to_base64nocrop = "--to-base64-no-crop";
if (html.compare(argv[1]) == 0)
- xmlt.createHTML(argv[3]);
- else if (pdf.compare(argv[1]) == 0)
- xmlt.createPDF(argv[3], true);
+ {
+ XmlTransform xmlt(argv[2], argv[3], argv[4]);
+ xmlt.createHTML(false);
+ }
+ if (pdf.compare(argv[1]) == 0)
+ {
+ XmlTransform xmlt(argv[2], argv[3], argv[4]);
+ xmlt.createPDF(true, false);
+ }
else if (pdf_no_crop.compare(argv[1]) == 0)
- xmlt.createPDF(argv[3], false);
+ {
+ XmlTransform xmlt(argv[2], argv[3], argv[4]);
+ xmlt.createPDF(false, false);
+ }
+ else if (to_base64.compare(argv[1]) == 0)
+ {
+ XmlTransform xmlt(argv[2], argv[3], QString::Null(), argv[4]);
+ xmlt.toBase64(false);
+ }
+ else if (to_base64nocrop.compare(argv[1]) == 0)
+ {
+ XmlTransform xmlt(argv[2], argv[3], QString::Null(), argv[4]);
+ xmlt.toBase64(true);
+ }
+ else
+ std::cout << man << std::endl;
+ }
+ else if (argc > 3)
+ {
+ std::string pdfbase64 = "--pdf-base64";
+ std::string pdfbase64nocrop = "--pdf-base64-no-crop";
+ std::string htmlbase64 = "--html-base64";
+ std::string from_base64 = "--from-base64";
+
+ if (pdfbase64.compare(argv[1]) == 0)
+ {
+ XmlTransform xmlt(argv[2], QString::Null(), argv[3]);
+ xmlt.createPDF(true, true);
+ }
+ else if (pdfbase64nocrop.compare(argv[1]) == 0)
+ {
+ XmlTransform xmlt(argv[2], QString::Null(), argv[3]);
+ xmlt.createPDF(false, true);
+ }
+ else if (htmlbase64.compare(argv[1]) == 0)
+ {
+ XmlTransform xmlt(argv[2], QString::Null(), argv[3]);
+ xmlt.createHTML(true);
+ }
+ else if (from_base64.compare(argv[1]) == 0)
+ {
+ XmlTransform xmlt(argv[2], QString::Null(), argv[3]);
+ xmlt.fromBase64();
+ }
else
std::cout << man << std::endl;
}
diff --git a/scribo/sandbox/arthur/xml_transform/templates/html/xsl.xsl b/scribo/sandbox/arthur/xml_transform/templates/html/xsl.xsl
index 3d6a1c5..1f29044 100644
--- a/scribo/sandbox/arthur/xml_transform/templates/html/xsl.xsl
+++ b/scribo/sandbox/arthur/xml_transform/templates/html/xsl.xsl
@@ -209,8 +209,7 @@
<xsl:attribute name="height">
<xsl:value-of select="$y2 - $y1" />
</xsl:attribute>
- <xsl:attribute name="src">
- img/<xsl:value-of select="$id"/>.png</xsl:attribute>
+ <xsl:attribute name="src">img/<xsl:value-of select="$id"/>.png</xsl:attribute>
</img>
</div>
diff --git a/scribo/sandbox/arthur/xml_transform/templates/html/xsl.xsl b/scribo/sandbox/arthur/xml_transform/templates/html/xsl_base64.xsl
similarity index 97%
copy from scribo/sandbox/arthur/xml_transform/templates/html/xsl.xsl
copy to scribo/sandbox/arthur/xml_transform/templates/html/xsl_base64.xsl
index 3d6a1c5..1c25e42 100644
--- a/scribo/sandbox/arthur/xml_transform/templates/html/xsl.xsl
+++ b/scribo/sandbox/arthur/xml_transform/templates/html/xsl_base64.xsl
@@ -174,9 +174,9 @@
<!-- NON-TEXT REGIONS -->
<xsl:if test="name() = 'image_region' or name() = 'separator_region' or name() = 'graphic_region' or name() = 'chart_region' or name() = 'table_region'">
- <!-- id -->
- <xsl:variable name="id">
- <xsl:value-of select="@id" />
+ <!-- data -->
+ <xsl:variable name="data">
+ <xsl:value-of select="container/data" />
</xsl:variable>
<!-- depth -->
@@ -210,7 +210,8 @@
<xsl:value-of select="$y2 - $y1" />
</xsl:attribute>
<xsl:attribute name="src">
- img/<xsl:value-of select="$id"/>.png</xsl:attribute>
+ data:image/png;base64,<xsl:value-of select="$data"/>
+ </xsl:attribute>
</img>
</div>
diff --git a/scribo/sandbox/arthur/xml_transform/templates/pdf/main.xsl b/scribo/sandbox/arthur/xml_transform/templates/pdf/main64.xsl
similarity index 94%
copy from scribo/sandbox/arthur/xml_transform/templates/pdf/main.xsl
copy to scribo/sandbox/arthur/xml_transform/templates/pdf/main64.xsl
index 065831e..ecc7443 100644
--- a/scribo/sandbox/arthur/xml_transform/templates/pdf/main.xsl
+++ b/scribo/sandbox/arthur/xml_transform/templates/pdf/main64.xsl
@@ -46,7 +46,7 @@
<fo:block>
<fo:external-graphic>
<xsl:attribute name="src">
- url('img/image.png')
+ data:image/png;base64,<xsl:value-of select="pcGts/page/image_region/container/data" />
</xsl:attribute>
</fo:external-graphic>
</fo:block>
diff --git a/scribo/sandbox/arthur/xml_transform/templates/pdf/regions.xsl b/scribo/sandbox/arthur/xml_transform/templates/pdf/regions_base64.xsl
similarity index 91%
copy from scribo/sandbox/arthur/xml_transform/templates/pdf/regions.xsl
copy to scribo/sandbox/arthur/xml_transform/templates/pdf/regions_base64.xsl
index 65a8c79..add0cba 100644
--- a/scribo/sandbox/arthur/xml_transform/templates/pdf/regions.xsl
+++ b/scribo/sandbox/arthur/xml_transform/templates/pdf/regions_base64.xsl
@@ -11,8 +11,8 @@
pcGts/page/separator_region">
<!-- ID of the region, used to display id.png -->
- <xsl:variable name="id">
- <xsl:value-of select="@id" />
+ <xsl:variable name="data">
+ <xsl:value-of select="container/data" />
</xsl:variable>
<!-- Regions coordinates -->
@@ -47,7 +47,7 @@
<fo:block>
<fo:external-graphic>
<xsl:attribute name="src">
- url('img/<xsl:value-of select="$id" />.png')
+ url('data:image/png;base64,<xsl:value-of select="$data" />')
</xsl:attribute>
</fo:external-graphic>
</fo:block>
diff --git a/scribo/sandbox/arthur/xml_transform/templates/pdf/regions.xsl b/scribo/sandbox/arthur/xml_transform/templates/pdf/regions_png.xsl
similarity index 100%
rename from scribo/sandbox/arthur/xml_transform/templates/pdf/regions.xsl
rename to scribo/sandbox/arthur/xml_transform/templates/pdf/regions_png.xsl
diff --git a/scribo/sandbox/arthur/xml_transform/xml_transform.cc b/scribo/sandbox/arthur/xml_transform/xml_transform.cc
index dd35aff..ebfbed8 100644
--- a/scribo/sandbox/arthur/xml_transform/xml_transform.cc
+++ b/scribo/sandbox/arthur/xml_transform/xml_transform.cc
@@ -23,69 +23,114 @@
// exception does not however invalidate any other reasons why the
// executable file might be covered by the GNU General Public License.
+# include "xml_transform.hh"
# include "image_crop.hh"
# include "loader.hh"
-# include "xml_transform.hh"
+# include "common.hh"
+# include <iostream>
-XmlTransform::XmlTransform(QString output, QString xml_file) :
- output_dir_(output),
- xml_file_(xml_file)
+XmlTransform::XmlTransform(QString xml_file, QString image_file, QString output, QString file) :
+ xml_file_(xml_file),
+ image_(image_file),
+ loader_(new Loader()),
+ file_(file)
{
- Loader loader;
- if (!loader.set_output(output_dir_))
- abort();
+ QFile fi(image_);
+ QFile fx(xml_file_);
+
+ if (file_ != QString::Null())
+ output_dir_ = "/tmp/xml_transform";
+ else
+ output_dir_ = output;
+
+ if (output_dir_ != QString::Null() && !loader_->set_output(output_dir_))
+ {
+ std::cout << "Cant't create " << output_dir_.toStdString() << "dir! Aborting..." << std::endl;
+ abort();
+ }
+ else if (!fi.exists() && image_ != QString::Null())
+ {
+ std::cout << "Image file does not exist ! Aborting..." << std::endl;
+ abort();
+ }
+ else if (!fx.exists())
+ {
+ std::cout << "XML file does not exist ! Aborting..." << std::endl;
+ abort();
+ }
+
+ crop_ = new ImageCrop(xml_file_, image_, output_dir_);
}
XmlTransform::~XmlTransform()
{
}
-void XmlTransform::createPDF (QString img, bool crop)
+void XmlTransform::fromBase64()
{
- Loader loader;
+ QString output = output_dir_;
+ output.append("img");
+
+ if (loader_->set_output(output))
+ crop_->from_base64();
+ else
+ abort();
+}
+void XmlTransform::toBase64(bool crop)
+{
QString output = output_dir_;
output.append("img");
- if (loader.set_output(output))
+ if (loader_->set_output(output))
{
- if (loader.load_xml(xml_file_, false, output_dir_))
- {
+ if (!crop)
+ crop_->crop_regions();
- ImageCrop Crop;
+ crop_->to_base64(file_, crop);
+ }
+ else
+ abort();
+}
- if (crop)
- Crop.crop_regions(xml_file_, img, output_dir_);
- else
- Crop.save_image(img, output_dir_);
+void XmlTransform::createPDF (bool crop, bool base64)
+{
+ if (loader_->xml_output(xml_file_, false, output_dir_))
+ {
+ if (!base64)
+ {
+ QString output = output_dir_;
+ output.append("img");
- loader.add_pdf_templates(crop, output_dir_);
+ if (loader_->set_output(output))
+ {
+ if (crop)
+ crop_->crop_regions();
+ else
+ crop_->save_image("image");
+ }
}
- else
- abort();
+
+ loader_->add_pdf_templates(crop, base64, output_dir_);
}
else
abort();
}
-void XmlTransform::createHTML(QString img)
+void XmlTransform::createHTML(bool base64)
{
- Loader loader;
-
- QString output = output_dir_;
- output.append("img");
-
- if (loader.set_output(output))
+ if (loader_->xml_output(xml_file_, true, output_dir_))
{
- if (loader.load_xml(xml_file_, true, output_dir_))
+ if (!base64)
{
- ImageCrop Crop;
-
- Crop.crop_regions(xml_file_, img, output_dir_);
- loader.add_html_templates(output_dir_);
+ QString output = output_dir_;
+ output.append("img");
+ if (loader_->set_output(output))
+ crop_->crop_regions();
+ else
+ abort();
}
- else
- abort();
+ loader_->add_html_templates(base64, output_dir_);
}
else
abort();
diff --git a/scribo/sandbox/arthur/xml_transform/xml_transform.hh b/scribo/sandbox/arthur/xml_transform/xml_transform.hh
index 808c108..172bddb 100644
--- a/scribo/sandbox/arthur/xml_transform/xml_transform.hh
+++ b/scribo/sandbox/arthur/xml_transform/xml_transform.hh
@@ -26,22 +26,32 @@
#ifndef XML_TRANFORM_HH
# define XML_TRANFORM_HH
-# include <QtGui>
+# include <QtCore>
+
+
+class Loader;
+class ImageCrop;
class XmlTransform : public QObject
{
Q_OBJECT
public:
- XmlTransform(QString output, QString xml_file);
+ XmlTransform(QString xml_file, QString image_file, QString output, QString file = QString::Null());
~XmlTransform();
- void createHTML(QString img);
- void createPDF(QString img, bool crop);
+ void createHTML(bool base64);
+ void createPDF(bool crop, bool base64);
+ void toBase64(bool crop);
+ void fromBase64();
-protected:
+private:
QString output_dir_;
QString xml_file_;
+ QString image_;
+ Loader* loader_;
+ ImageCrop* crop_;
+ QString file_;
};
#endif // !XML_TRANFORM_HH
diff --git a/scribo/sandbox/arthur/xml_transform/xml_transform.pro b/scribo/sandbox/arthur/xml_transform/xml_transform.pro
index 161a7f4..c038cf6 100644
--- a/scribo/sandbox/arthur/xml_transform/xml_transform.pro
+++ b/scribo/sandbox/arthur/xml_transform/xml_transform.pro
@@ -1,5 +1,5 @@
######################################################################
-# Automatically generated by qmake (2.01a) jeu. juil. 8 16:33:27 2010
+# Automatically generated by qmake (2.01a) jeu. juil. 15 13:47:38 2010
######################################################################
TEMPLATE = app
@@ -10,11 +10,7 @@ QMAKE_CXXFLAGS += -I/amd/beyrouth/home/lrde/stage/crepin/git/olena/milena -I/amd
QT += xml
LIBS += `Magick++-config --libs`
+
# Input
-HEADERS += domitem.hh dommodel.hh image_crop.hh loader.hh xml_transform.hh
-SOURCES += domitem.cc \
- dommodel.cc \
- image_crop.cc \
- loader.cc \
- main.cc \
- xml_transform.cc
+HEADERS += common.hh image_crop.hh loader.hh xml_transform.hh
+SOURCES += common.cc image_crop.cc loader.cc main.cc xml_transform.cc
--
1.5.6.5
1
0