* igr/segmentation/src/mln_data.cc
* igr/segmentation2dt/src/mln_data.cc
* igr/shared/src/igr_types.hh
* igr/viewer/src/mln_data.cc
---
igr/ChangeLog | 9 +++++++++
igr/segmentation/src/mln_data.cc | 8 ++++----
igr/segmentation2dt/src/mln_data.cc | 2 +-
igr/shared/src/igr_types.hh | 4 ++--
igr/viewer/src/mln_data.cc | 23 ++++++++++++-----------
5 files changed, 28 insertions(+), 18 deletions(-)
diff --git a/igr/ChangeLog b/igr/ChangeLog
index f915752..1a38d23 100644
--- a/igr/ChangeLog
+++ b/igr/ChangeLog
@@ -1,3 +1,12 @@
+2011-01-13 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Use int_u16 instead of int_u12.
+
+ * igr/segmentation/src/mln_data.cc
+ * igr/segmentation2dt/src/mln_data.cc
+ * igr/shared/src/igr_types.hh
+ * igr/viewer/src/mln_data.cc
+
2010-11-18 Guillaume Lazzara <z(a)lrde.epita.fr>
Fix Paths in scripts and build systems.
diff --git a/igr/segmentation/src/mln_data.cc b/igr/segmentation/src/mln_data.cc
index 0254d98..ca4af30 100644
--- a/igr/segmentation/src/mln_data.cc
+++ b/igr/segmentation/src/mln_data.cc
@@ -54,7 +54,7 @@ namespace igr
void mln_data::load_pgm(const QString& filename)
{
- image2d<value::int_u12> tmp;
+ image2d<value::int_u16> tmp;
io::pgm::load(tmp, filename.toStdString());
if (!tmp.is_valid())
@@ -81,7 +81,7 @@ namespace igr
if (header.dim == 2)
{
- image2d<value::int_u12> tmp;
+ image2d<value::int_u16> tmp;
io::dicom::load(tmp, filename.toStdString());
if (!tmp.is_valid())
@@ -119,7 +119,7 @@ namespace igr
io::dump::dump_header
header = io::dump::get_header(filename.toStdString());
- if (header.value_type != "int_u12")
+ if (header.value_type != "int_u16")
{
QString msg("Image value type not supported : %1");
msg.arg(header.value_type.c_str());
@@ -129,7 +129,7 @@ namespace igr
if (header.dim == 2)
{
- image2d<value::int_u12> tmp;
+ image2d<value::int_u16> tmp;
io::dump::load(tmp, filename.toStdString());
if (!tmp.is_valid())
diff --git a/igr/segmentation2dt/src/mln_data.cc b/igr/segmentation2dt/src/mln_data.cc
index 160363f..b49be39 100644
--- a/igr/segmentation2dt/src/mln_data.cc
+++ b/igr/segmentation2dt/src/mln_data.cc
@@ -91,7 +91,7 @@ namespace igr
io::dump::dump_header
header = io::dump::get_header(filename.toStdString());
- if (header.value_type != "int_u12")
+ if (header.value_type != "int_u16" || header.value_type !=
"int_u12")
{
QString msg("Image value type not supported : %1");
msg.arg(header.value_type.c_str());
diff --git a/igr/shared/src/igr_types.hh b/igr/shared/src/igr_types.hh
index 5154b6b..6c10b52 100644
--- a/igr/shared/src/igr_types.hh
+++ b/igr/shared/src/igr_types.hh
@@ -4,7 +4,7 @@
# include <shared/src/color.hh>
# include <mln/value/label_16.hh>
-# include <mln/value/int_u12.hh>
+# include <mln/value/int_u16.hh>
# include <mln/value/int_u8.hh>
@@ -14,7 +14,7 @@ namespace igr
using namespace mln;
// Data type of original DICOM files.
- typedef value::int_u12 input_data_t;
+ typedef value::int_u16 input_data_t;
// Data type of DICOM images loaded in memories.
typedef value::int_u8 input_mem_data_t;
diff --git a/igr/viewer/src/mln_data.cc b/igr/viewer/src/mln_data.cc
index 4ba3864..e1ae0b1 100644
--- a/igr/viewer/src/mln_data.cc
+++ b/igr/viewer/src/mln_data.cc
@@ -27,6 +27,7 @@
#include <mln/data/convert.hh>
#include <mln/data/stretch.hh>
#include <mln/value/int_u8.hh>
+#include <mln/value/int_u16.hh>
#include <mln/extension/adjust.hh>
#include <mln/io/dump/all.hh>
@@ -73,7 +74,7 @@ namespace igr
void mln_data::load_pgm(const QString& filename)
{
- image2d<value::int_u12> tmp;
+ image2d<value::int_u16> tmp;
io::pgm::load(tmp, filename.toStdString());
if (!tmp.is_valid())
@@ -100,9 +101,9 @@ namespace igr
if (header.dim == 2)
{
- if (header.value_type == "int_u12")
+ if (header.value_type == "int_u16")
{
- image2d<value::int_u12> tmp;
+ image2d<value::int_u16> tmp;
io::raw::load(tmp, filename.toStdString());
if (!tmp.is_valid())
@@ -146,9 +147,9 @@ namespace igr
}
else if (header.dim == 3)
{
- if (header.value_type == "int_u12")
+ if (header.value_type == "int_u16")
{
- image2d<value::int_u12> tmp;
+ image2d<value::int_u16> tmp;
io::raw::load(tmp, filename.toStdString());
if (!tmp.is_valid())
@@ -211,7 +212,7 @@ namespace igr
if (header.dim == 2)
{
- image2d<value::int_u12> tmp;
+ image2d<value::int_u16> tmp;
io::dicom::load(tmp, filename.toStdString());
if (!tmp.is_valid())
@@ -224,7 +225,7 @@ namespace igr
}
else if (header.dim == 3)
{
- image3d<value::int_u12> tmp;
+ image3d<value::int_u16> tmp;
io::dicom::load(tmp, filename.toStdString());
in_ = data::convert(double(), tmp);
@@ -254,9 +255,9 @@ namespace igr
if (header.dim == 2)
{
- if (header.value_type == "int_u12")
+ if (header.value_type == "int_u16")
{
- image2d<value::int_u12> tmp;
+ image2d<value::int_u16> tmp;
io::dump::load(tmp, filename.toStdString());
if (!tmp.is_valid())
@@ -279,9 +280,9 @@ namespace igr
}
else if (header.dim == 3)
{
- if (header.value_type == "int_u12")
+ if (header.value_type == "int_u16")
{
- image2d<value::int_u12> tmp;
+ image2d<value::int_u16> tmp;
io::dicom::load(tmp, filename.toStdString());
in_ = make::image3d(data::convert(double(), tmp));
--
1.5.6.5