* mln/io/all.hh [HAVE_GDCM]: Include mln/io/dicom/all.hh.
* mln/io/dicom/load.hh: Fix paths of included GDCM headers.
Aesthetic changes.
* tests/io/Makefile.am (SUBDIRS) [HAVE_GDCM]: Add dicom.
* tests/io/dicom/Makefile.am: Aesthetic changes.
* tests/io/dicom/dicom.cc: Remove useless header inclusions.
---
milena/ChangeLog | 11 +++++++++++
milena/mln/io/all.hh | 5 ++++-
milena/mln/io/dicom/load.hh | 19 +++++++++----------
milena/tests/io/Makefile.am | 5 ++++-
milena/tests/io/dicom/Makefile.am | 7 ++++---
milena/tests/io/dicom/dicom.cc | 7 +++----
6 files changed, 35 insertions(+), 19 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 5a9da7d..8560482 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,16 @@
2009-06-02 Roland Levillain <roland(a)lrde.epita.fr>
+ Add tentative support for GDCM in the build system.
+
+ * mln/io/all.hh [HAVE_GDCM]: Include mln/io/dicom/all.hh.
+ * mln/io/dicom/load.hh: Fix paths of included GDCM headers.
+ Aesthetic changes.
+ * tests/io/Makefile.am (SUBDIRS) [HAVE_GDCM]: Add dicom.
+ * tests/io/dicom/Makefile.am: Aesthetic changes.
+ * tests/io/dicom/dicom.cc: Remove useless header inclusions.
+
+2009-06-02 Roland Levillain <roland(a)lrde.epita.fr>
+
* mln/io/dicom/all.hh: New file.
2009-06-02 Roland Levillain <roland(a)lrde.epita.fr>
diff --git a/milena/mln/io/all.hh b/milena/mln/io/all.hh
index bbb47d7..767cd7d 100644
--- a/milena/mln/io/all.hh
+++ b/milena/mln/io/all.hh
@@ -52,7 +52,6 @@ namespace mln
# include <mln/io/cloud/all.hh>
# include <mln/io/dump/all.hh>
-# include <mln/io/dicom/load.hh>
# include <mln/io/pbm/all.hh>
# include <mln/io/pfm/all.hh>
# include <mln/io/pgm/all.hh>
@@ -66,6 +65,10 @@ namespace mln
| I/O routines depending on a third-party library. |
`--------------------------------------------------*/
+# ifdef HAVE_GDCM
+# include <mln/io/dicom/all.hh>
+# endif // ! HAVE_GDCM
+
# ifdef HAVE_CFITSIO
# include <mln/io/fits/all.hh>
# endif // ! HAVE_CFITSIO
diff --git a/milena/mln/io/dicom/load.hh b/milena/mln/io/dicom/load.hh
index b41eddb..d296442 100644
--- a/milena/mln/io/dicom/load.hh
+++ b/milena/mln/io/dicom/load.hh
@@ -28,21 +28,19 @@
#ifndef MLN_IO_DICOM_LOAD_HH
# define MLN_IO_DICOM_LOAD_HH
-/// \file mln/io/magick/load.hh
-///
-/// \brief Define a function which loads an image of kind magick with
-/// given path.
+/// \file mln/io/magick/load.hh
+/// \brief Define a function which loads a GDCM image.
# include <mln/core/image/image2d.hh>
# include <mln/core/image/image3d.hh>
# include <mln/algebra/vec.hh>
-# include <gdcmReader.h>
-# include <gdcmImageReader.h>
-# include <gdcmWriter.h>
-# include <gdcmDataSet.h>
-# include <gdcmAttribute.h>
+# include <gdcm-2.0/gdcmReader.h>
+# include <gdcm-2.0/gdcmImageReader.h>
+# include <gdcm-2.0/gdcmWriter.h>
+# include <gdcm-2.0/gdcmDataSet.h>
+# include <gdcm-2.0/gdcmAttribute.h>
namespace mln
@@ -54,7 +52,7 @@ namespace mln
namespace dicom
{
- /// Load a dicom image in a Milena image.
+ /// Load a DICOM file in a Milena image.
///
/// \param[out] ima A reference to the image which will receive
/// data.
@@ -63,6 +61,7 @@ namespace mln
void load(Image<I>& ima,
const std::string& filename);
+
# ifndef MLN_INCLUDE_ONLY
template <typename V>
diff --git a/milena/tests/io/Makefile.am b/milena/tests/io/Makefile.am
index 867e846..6f91495 100644
--- a/milena/tests/io/Makefile.am
+++ b/milena/tests/io/Makefile.am
@@ -7,7 +7,6 @@ include $(top_srcdir)/milena/tests/tests.mk
## ---------------------- ##
SUBDIRS = \
- dicom \
dump \
off \
pbm \
@@ -20,6 +19,10 @@ SUBDIRS = \
## I/O routines depending on a third-party library. ##
## ------------------------------------------------- ##
+if HAVE_GDCM
+ SUBDIRS += dicom
+endif HAVE_GDCM
+
if HAVE_CFITSIO
SUBDIRS += fits
endif HAVE_CFITSIO
diff --git a/milena/tests/io/dicom/Makefile.am b/milena/tests/io/dicom/Makefile.am
index 07646c8..5321b1c 100644
--- a/milena/tests/io/dicom/Makefile.am
+++ b/milena/tests/io/dicom/Makefile.am
@@ -1,10 +1,11 @@
-## Process this file through Automake to create Makefile.in -*- Makefile -*-
+## Process this file through Automake to create Makefile.in.
include $(top_srcdir)/milena/tests/tests.mk
-check_PROGRAMS = \
- dicom
+check_PROGRAMS = dicom
+# FIXME: Upon completion, if this test only read (not write) images,
+# rename it as load.cc
dicom_SOURCES = dicom.cc
TESTS = $(check_PROGRAMS)
diff --git a/milena/tests/io/dicom/dicom.cc b/milena/tests/io/dicom/dicom.cc
index cd30c06..1239d60 100644
--- a/milena/tests/io/dicom/dicom.cc
+++ b/milena/tests/io/dicom/dicom.cc
@@ -31,20 +31,19 @@
#include <mln/core/image/image2d.hh>
#include <mln/io/dicom/load.hh>
-#include <mln/io/dump/save.hh>
#include <mln/data/compare.hh>
#include <mln/value/int_u12.hh>
-#include "tests/data.hh"
-
#include <mln/debug/println.hh>
+#include "tests/data.hh"
+
int main()
{
using namespace mln;
- return 0;
+ // FIXME: This test is empty!
}
--
1.6.1.2
Show replies by date