---
milena/ChangeLog | 4 ++++
milena/mln/io/dicom/load.hh | 15 +++++++++++++--
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 7268baf..994efe7 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,7 @@
+2011-01-27 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ * mln/io/dicom/load.hh: Fix invalid image loading.
+
2011-01-13 Guillaume Lazzara <z(a)lrde.epita.fr>
Add more from_to overloads.
diff --git a/milena/mln/io/dicom/load.hh b/milena/mln/io/dicom/load.hh
index f250a16..1823b18 100644
--- a/milena/mln/io/dicom/load.hh
+++ b/milena/mln/io/dicom/load.hh
@@ -40,7 +40,6 @@
# include <gdcm-2.0/gdcmDataSet.h>
# include <gdcm-2.0/gdcmAttribute.h>
-
namespace mln
{
@@ -107,6 +106,9 @@ namespace mln
abort();
}
+ // FIXME: Check image.GetPixelFormat() with mln_value(I)
+ // quantification.
+
//gdcm::File &file = r.GetFile();
//gdcm::DataSet& ds = file.GetDataSet();
@@ -132,7 +134,9 @@ namespace mln
if (mln_site_(I)::dim != ndims)
{
- std::cerr << "error: dimension mismatch" << std::endl;
+ std::cerr << "error: dimension mismatch. Found "
+ << ndims << " but expected " << mln_site_(I)::dim
+ << std::endl;
abort();
}
@@ -155,6 +159,13 @@ namespace mln
initialize(ima, result);
mln_piter(I) p(ima.domain());
unsigned int index = 0;
+
+ // FIXME: HACK. We may prefer to change the way we access the
+ // data instead of swapping that information. If swap is not
+ // performed, the loaded image is rotated and symmetrized.
+ std::swap(vdims[0], vdims[1]);
+
+ // int k = 0;
for_all(p)
{
index = 0;
--
1.5.6.5
Show replies by date