From 689f929ff0f35aabd30d81ffa75eb66fdf1a3c16 Mon Sep 17 00:00:00 2001 From: frog Date: Wed, 29 Sep 2004 17:33:12 +0000 Subject: [PATCH] * CLEANUP_ROUND for gdcmPixelConvert: - src/gdcmFile.cxx, gdcmFile.h, gdcmHeader.cxx, gdcmHeader.h clean up - src/gdcmPixelStuff[h|cxx] removed - src/gdcmPixelConvert[h|cxx] added. Preparatory work included. - src/CMakeLists.txt changed accordingly * GDCMHOME clean up: - MANIFEST.in, WrapSwig.py, WrapVTK.py, distutilsWrapping.py and gdcmVersion.py moved to newly created ATTIC related gdcmPython/SetupOldies/ directory. * Autotools clean up: - */*/Makefile.am removed AT EXCEPTION of gdcmPython/Makefile.am - autogen.sh configure.in acinclude.m4 python.m4 removed --- ChangeLog | 14 + Dicts/Makefile.am | 4 - Doc/gdcmUML.xmi | 1226 ++++++++--------- Makefile.am | 20 - acinclude.m4 | 65 - autogen.sh | 139 -- configure.in | 94 -- gdcm.dsw | 197 --- .../SetupOldies/MANIFEST.in | 0 .../SetupOldies/WrapSwig.py | 0 .../SetupOldies/WrapVTK.py | 0 .../SetupOldies/distutilsWrapping.py | 0 gdcmVersion.py => gdcmPython/gdcmVersion.py | 0 python.m4 | 129 -- src/CMakeLists.txt | 2 +- src/Makefile.am | 75 - src/gdcmFile.cxx | 272 ++-- src/gdcmFile.h | 54 +- src/gdcmHeader.cxx | 277 ++-- src/gdcmHeader.h | 9 +- src/gdcmPixelConvert.cxx | 206 +++ src/gdcmPixelConvert.h | 71 + src/gdcmPixelStuff.cxx | 44 - src/gdcmPixelStuff.h | 39 - src/jpeg/Makefile.am | 3 - src/jpeg/libijg12/Makefile.am | 71 - src/jpeg/libijg8/Makefile.am | 72 - src/jpeg/ljpg/Makefile.am | 23 - uml.xmi | 998 -------------- vtk/Makefile.am | 38 - 30 files changed, 1206 insertions(+), 2936 deletions(-) delete mode 100644 Dicts/Makefile.am delete mode 100644 Makefile.am delete mode 100644 acinclude.m4 delete mode 100755 autogen.sh delete mode 100644 configure.in delete mode 100644 gdcm.dsw rename MANIFEST.in => gdcmPython/SetupOldies/MANIFEST.in (100%) rename WrapSwig.py => gdcmPython/SetupOldies/WrapSwig.py (100%) rename WrapVTK.py => gdcmPython/SetupOldies/WrapVTK.py (100%) rename distutilsWrapping.py => gdcmPython/SetupOldies/distutilsWrapping.py (100%) rename gdcmVersion.py => gdcmPython/gdcmVersion.py (100%) delete mode 100644 python.m4 delete mode 100644 src/Makefile.am create mode 100644 src/gdcmPixelConvert.cxx create mode 100644 src/gdcmPixelConvert.h delete mode 100644 src/gdcmPixelStuff.cxx delete mode 100644 src/gdcmPixelStuff.h delete mode 100644 src/jpeg/Makefile.am delete mode 100644 src/jpeg/libijg12/Makefile.am delete mode 100644 src/jpeg/libijg8/Makefile.am delete mode 100644 src/jpeg/ljpg/Makefile.am delete mode 100644 uml.xmi delete mode 100644 vtk/Makefile.am diff --git a/ChangeLog b/ChangeLog index 8a877634..a719f2d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2004-09-29 Eric Boix + * CLEANUP_ROUND for gdcmPixelConvert: + - src/gdcmFile.cxx, gdcmFile.h, gdcmHeader.cxx, gdcmHeader.h clean up + - src/gdcmPixelStuff[h|cxx] removed + - src/gdcmPixelConvert[h|cxx] added. Preparatory work included. + - src/CMakeLists.txt changed accordingly + * GDCMHOME clean up: + - MANIFEST.in, WrapSwig.py, WrapVTK.py, distutilsWrapping.py and + gdcmVersion.py moved to newly created ATTIC related + gdcmPython/SetupOldies/ directory. + * Autotools clean up: + - */*/Makefile.am removed AT EXCEPTION of gdcmPython/Makefile.am + - autogen.sh configure.in acinclude.m4 python.m4 removed + 2004-09-27 Eric Boix * src/*.cxx *.h Reference to License.htm fixed to License.html. * Doc/CMakeLists.txt, doxygen.config.in: fix. diff --git a/Dicts/Makefile.am b/Dicts/Makefile.am deleted file mode 100644 index 54da1d7c..00000000 --- a/Dicts/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -dictsdir = $(datadir)/gdcm -dicts_DATA = dicomV3.dic README - -EXTRA_DIST = dicomV3.dic diff --git a/Doc/gdcmUML.xmi b/Doc/gdcmUML.xmi index 2eda2ff1..a4c5ac39 100644 --- a/Doc/gdcmUML.xmi +++ b/Doc/gdcmUML.xmi @@ -10,7 +10,7 @@ - + @@ -127,189 +127,189 @@ - + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - + + - - + + - - + + - + - + - - + + - + - + - - + + - - + + - + - - + + - - + + - - + + - + - - - + + + - - + + - + - + - - + + - - + + - - + + - - + + - + - + - + - - - - + + + + - + - + - + - + - + - + - + - - + + @@ -327,7 +327,6 @@ - @@ -336,6 +335,7 @@ + @@ -375,7 +375,7 @@
- +
@@ -397,52 +397,52 @@ - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -451,74 +451,74 @@
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -544,27 +544,27 @@ - +
- +
- +
- +
- +
@@ -573,39 +573,39 @@
- +
- +
- +
- +
- +
- +
- +
- +
@@ -631,52 +631,52 @@ - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -685,74 +685,74 @@
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -778,27 +778,27 @@ - +
- +
- +
- +
- +
@@ -807,39 +807,39 @@
- +
- +
- +
- +
- +
- +
- +
- +
@@ -868,7 +868,7 @@
- +
@@ -890,27 +890,27 @@ - +
- +
- +
- +
- +
@@ -919,39 +919,39 @@
- +
- +
- +
- +
- +
- +
- +
- +
@@ -977,52 +977,52 @@ - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -1031,74 +1031,74 @@
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -1124,27 +1124,27 @@ - +
- +
- +
- +
- +
@@ -1153,39 +1153,39 @@
- +
- +
- +
- +
- +
- +
- +
- +
@@ -1214,7 +1214,7 @@
- +
@@ -1236,27 +1236,27 @@ - +
- +
- +
- +
- +
@@ -1265,39 +1265,39 @@
- +
- +
- +
- +
- +
- +
- +
- +
@@ -1323,27 +1323,27 @@ - +
- +
- +
- +
- +
@@ -1352,39 +1352,39 @@
- +
- +
- +
- +
- +
- +
- +
- +
@@ -1410,52 +1410,52 @@ - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -1464,74 +1464,74 @@
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -1557,52 +1557,52 @@ - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -1611,74 +1611,74 @@
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -1704,52 +1704,52 @@ - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -1758,74 +1758,74 @@
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -1851,27 +1851,27 @@ - +
- +
- +
- +
- +
@@ -1880,39 +1880,39 @@
- +
- +
- +
- +
- +
- +
- +
- +
@@ -1941,7 +1941,7 @@
- +
@@ -1963,27 +1963,27 @@ - +
- +
- +
- +
- +
@@ -1992,39 +1992,39 @@
- +
- +
- +
- +
- +
- +
- +
- +
@@ -2240,7 +2240,7 @@
- +
@@ -2286,12 +2286,12 @@ - +
- +
@@ -2331,52 +2331,52 @@ - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -2508,74 +2508,74 @@
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -2625,7 +2625,7 @@ - +
@@ -2665,27 +2665,27 @@ - +
- +
- +
- +
- +
@@ -2817,39 +2817,39 @@
- +
- +
- +
- +
- +
- +
- +
- +
@@ -2899,12 +2899,12 @@ - +
- +
@@ -2944,52 +2944,52 @@ - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -3121,74 +3121,74 @@
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -3238,7 +3238,7 @@ - +
@@ -3278,27 +3278,27 @@ - +
- +
- +
- +
- +
@@ -3430,39 +3430,39 @@
- +
- +
- +
- +
- +
- +
- +
- +
@@ -3523,7 +3523,7 @@ - +
@@ -3672,7 +3672,7 @@
- +
@@ -3718,7 +3718,7 @@ - +
@@ -3758,27 +3758,27 @@ - +
- +
- +
- +
- +
@@ -3910,39 +3910,39 @@
- +
- +
- +
- +
- +
- +
- +
- +
@@ -3992,12 +3992,12 @@ - +
- +
@@ -4037,52 +4037,52 @@ - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -4214,74 +4214,74 @@
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -4331,7 +4331,7 @@ - +
@@ -4371,27 +4371,27 @@ - +
- +
- +
- +
- +
@@ -4523,39 +4523,39 @@
- +
- +
- +
- +
- +
- +
- +
- +
@@ -4765,7 +4765,7 @@
- +
@@ -4811,7 +4811,7 @@ - +
@@ -4851,27 +4851,27 @@ - +
- +
- +
- +
- +
@@ -5003,39 +5003,39 @@
- +
- +
- +
- +
- +
- +
- +
- +
@@ -5085,7 +5085,7 @@ - +
@@ -5125,27 +5125,27 @@ - +
- +
- +
- +
- +
@@ -5277,39 +5277,39 @@
- +
- +
- +
- +
- +
- +
- +
- +
@@ -5359,12 +5359,12 @@ - +
- +
@@ -5404,52 +5404,52 @@ - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -5581,74 +5581,74 @@
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -5698,12 +5698,12 @@ - +
- +
@@ -5743,52 +5743,52 @@ - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -5920,74 +5920,74 @@
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -6037,12 +6037,12 @@ - +
- +
@@ -6082,52 +6082,52 @@ - +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -6259,74 +6259,74 @@
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -6376,7 +6376,7 @@ - +
@@ -6416,27 +6416,27 @@ - +
- +
- +
- +
- +
@@ -6568,39 +6568,39 @@
- +
- +
- +
- +
- +
- +
- +
- +
@@ -6810,7 +6810,7 @@
- +
@@ -6856,7 +6856,7 @@ - +
@@ -6896,27 +6896,27 @@ - +
- +
- +
- +
- +
@@ -7048,39 +7048,39 @@
- +
- +
- +
- +
- +
- +
- +
- +
diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index 74028f0a..00000000 --- a/Makefile.am +++ /dev/null @@ -1,20 +0,0 @@ -## Process this file with automake to produce Makefile.in - -SUBDIRS = src vtk gdcmPython Test Dicts Doc - -EXTRA_DIST = \ - AUTHORS \ - ChangeLog \ - COPYING \ - INSTALL \ - NEWS \ - README \ - TODO \ - gdcm.spec \ - gdcm.dsw - -release: - $(MAKE) dist distdir=$(PACKAGE)-$(VERSION) - -snapshot: - $(MAKE) dist distdir=$(PACKAGE)`date +"%y%m%d"` diff --git a/acinclude.m4 b/acinclude.m4 deleted file mode 100644 index b70c7c4b..00000000 --- a/acinclude.m4 +++ /dev/null @@ -1,65 +0,0 @@ -## this one is commonly used with AM_PATH_PYTHONDIR ... -dnl AM_CHECK_PYMOD(MODNAME [,SYMBOL [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]]) -dnl Check if a module containing a given symbol is visible to python. -AC_DEFUN(AM_CHECK_PYMOD, -[AC_REQUIRE([AM_PATH_PYTHON]) -py_mod_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'` -AC_MSG_CHECKING(for ifelse([$2],[],,[$2 in ])python module $1) -AC_CACHE_VAL(py_cv_mod_$py_mod_var, [ -ifelse([$2],[], [prog=" -import sys -try: - import $1 -except ImportError: - sys.exit(1) -except: - sys.exit(0) -sys.exit(0)"], [prog=" -import $1 -$1.$2"]) -if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC - then - eval "py_cv_mod_$py_mod_var=yes" - else - eval "py_cv_mod_$py_mod_var=no" - fi -]) -py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"` -if test "x$py_val" != xno; then - AC_MSG_RESULT(yes) - ifelse([$3], [],, [$3 -])dnl -else - AC_MSG_RESULT(no) - ifelse([$4], [],, [$4 -])dnl -fi -]) - -dnl a macro to check for ability to create python extensions -dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE]) -dnl function also defines PYTHON_INCLUDES -AC_DEFUN([AM_CHECK_PYTHON_HEADERS], -[AC_REQUIRE([AM_PATH_PYTHON]) -AC_MSG_CHECKING(for headers required to compile python extensions) -dnl deduce PYTHON_INCLUDES -py_prefix=`$PYTHON -c "import sys; print sys.prefix"` -py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` -PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" -if test "$py_prefix" != "$py_exec_prefix"; then - PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}" -fi -echo py_prefix= $py_prefix -echo py_exec_prefix= $py_exec_prefix -AC_SUBST(PYTHON_INCLUDES) -dnl check if the headers exist: -save_CPPFLAGS="$CPPFLAGS" -CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES" -AC_TRY_CPP([#include ],dnl -[AC_MSG_RESULT(found) -$1],dnl -[AC_MSG_RESULT(not found) -$2]) -CPPFLAGS="$save_CPPFLAGS" -]) - diff --git a/autogen.sh b/autogen.sh deleted file mode 100755 index 8317d9ac..00000000 --- a/autogen.sh +++ /dev/null @@ -1,139 +0,0 @@ -#!/bin/sh -# Run this to generate all the initial makefiles, etc. - -srcdir=`dirname $0` -test -z "$srcdir" && srcdir=. - -PKG_NAME="gdcm" - -(test -f $srcdir/configure.in \ - && test -d $srcdir/src) || { - echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" - echo " top-level crea directory" - exit 1 -} - - -DIE=0 - -(autoconf --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "**Error**: You must have \`autoconf' installed to compile Gnome." - echo "Download the appropriate package for your distribution," - echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" - DIE=1 -} - -(grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && { - (libtool --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "**Error**: You must have \`libtool' installed to compile Gnome." - echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz" - echo "(or a newer version if it is available)" - DIE=1 - } -} - -grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && { - grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \ - (gettext --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "**Error**: You must have \`gettext' installed to compile Gnome." - echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz" - echo "(or a newer version if it is available)" - DIE=1 - } -} - -(automake --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "**Error**: You must have \`automake' installed to compile Gnome." - echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" - echo "(or a newer version if it is available)" - DIE=1 - NO_AUTOMAKE=yes -} - - -# if no automake, don't bother testing for aclocal -test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "**Error**: Missing \`aclocal'. The version of \`automake'" - echo "installed doesn't appear recent enough." - echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" - echo "(or a newer version if it is available)" - DIE=1 -} - -if test "$DIE" -eq 1; then - exit 1 -fi - -if test -z "$*"; then - echo "**Warning**: I am going to run \`configure' with no arguments." - echo "If you wish to pass any to it, please specify them on the" - echo \`$0\'" command line." - echo -fi - -case $CC in -xlc ) - am_opt=--include-deps;; -esac - -for coin in `find $srcdir -name configure.in -print` -do - dr=`dirname $coin` - if test -f $dr/NO-AUTO-GEN; then - echo skipping $dr -- flagged as no auto-gen - else - echo processing $dr - macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin` - ( cd $dr - aclocalinclude="-I . $ACLOCAL_FLAGS" - for k in $macrodirs; do - if test -d $k; then - aclocalinclude="$aclocalinclude -I $k" - ##else - ## echo "**Warning**: No such directory \`$k'. Ignored." - fi - done - if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then - if grep "sed.*POTFILES" configure.in >/dev/null; then - : do nothing -- we still have an old unmodified configure.in - else - echo "Creating $dr/aclocal.m4 ..." - test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 - echo "Running gettextize... Ignore non-fatal messages." - echo "no" | gettextize --force --copy - echo "Making $dr/aclocal.m4 writable ..." - test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 - fi - fi - if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then - echo "Running libtoolize..." - libtoolize --force --copy - fi - echo "Running aclocal $aclocalinclude ..." - aclocal $aclocalinclude - if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then - echo "Running autoheader..." - autoheader - fi - echo "Running automake --gnu $am_opt ..." - automake --add-missing --gnu $am_opt - echo "Running autoconf ..." - autoconf - ) - fi -done - -conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c - -if test x$NOCONFIGURE = x; then - echo Running $srcdir/configure $conf_flags "$@" ... - $srcdir/configure $conf_flags "$@" \ - && echo Now type \`make\' to compile $PKG_NAME || exit 1 -else - echo Skipping configure process. -fi diff --git a/configure.in b/configure.in deleted file mode 100644 index 7164f9a4..00000000 --- a/configure.in +++ /dev/null @@ -1,94 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -AC_INIT(src/gdcmDict.cxx) - -AM_INIT_AUTOMAKE(gdcm, 0.3.0) -AM_MAINTAINER_MODE -AM_CONFIG_HEADER(src/config.h) - -dnl Checks for programs. -AM_PROG_LIBTOOL -AC_PROG_CXX -AC_PROG_CC -AC_PROG_CPP -AC_PROG_INSTALL -AC_PROG_LN_S -AC_PROG_MAKE_SET - -dnl Checks for header files. -AC_HEADER_STDC - -dnl Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_TYPE_SIZE_T -AC_STRUCT_TM - -dnl Checks for endianness -AC_C_BIGENDIAN - -dnl Checks for int and long size -AC_CHECK_SIZEOF(char, 1) -AC_CHECK_SIZEOF(short, 2) -AC_CHECK_SIZEOF(int, 4) -AC_CHECK_SIZEOF(long, 4) -AC_CHECK_SIZEOF(long long, 8) - -AC_CHECK_PROG(DOXYGEN, doxygen, true, false) -AM_CONDITIONAL(HAVE_DOXYGEN, $DOXYGEN) -AC_SUBST(HAVE_DOXYGEN) - -dnl Let people disable the doxygen stuff. -AC_ARG_ENABLE(docygen, - [ --enable-doxygen Use doxygen to build documentation (default=auto)], - [enable_doxygen="$enableval"], - [enable_doxygen=auto]) - -if test x$enable_doxygen = xauto ; then - if test x$DOXYGEN = xtrue ; then - enable_doxygen=yes - else - enable_doxygen=no - fi -fi - -dnl NOTE: We need to use a separate automake conditional for this -dnl to make this work with the tarballs. -AM_CONDITIONAL(ENABLE_DOXYGEN, test x$enable_doxygen = xyes) - -dnl Checks for Python -AC_ARG_ENABLE(python, - [ --enable-python Enable Python language support (default=no).], - , - [enable_python="no"]) -dnl AC_MSG_RESULT($enable_python) -build_python=no -if test "yes" = "$enable_python"; then - AM_PATH_PYTHON(2.0.0) - if test -n "$PYTHON"; then - AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)]) - build_python=yes; - fi - AC_CHECK_PROGS(SWIG, swig13) -fi -AM_CONDITIONAL(BUILD_PYTHON, test x$build_python = xyes) - -dnl Checks for vtk -AC_ARG_ENABLE(vtk, - [ --enable-vtk Enable vtk extensions support (default=no).], - , - [enable_vtk="no"]) -AM_CONDITIONAL(BUILD_VTK, test x$enable_vtk = xyes) - -dnl produce Makefile.in files -AC_OUTPUT([ -Makefile -gdcm.spec -src/Makefile -src/jpeg/Makefile -src/jpeg/libijg8/Makefile -src/jpeg/libijg12/Makefile -src/jpeg/ljpg/Makefile -gdcmPython/Makefile -Test/Makefile -Dicts/Makefile -vtk/Makefile -Doc/Makefile]) diff --git a/gdcm.dsw b/gdcm.dsw deleted file mode 100644 index 838a0c0c..00000000 --- a/gdcm.dsw +++ /dev/null @@ -1,197 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "_vtkGdcm"=.\GDCMPYTHON\WIN32\_vtkGdcm.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name libgdcmljpeg - End Project Dependency - Begin Project Dependency - Project_Dep_Name libgdcmijpeg8 - End Project Dependency - Begin Project Dependency - Project_Dep_Name libgdcmijpeg12 - End Project Dependency -}}} - -############################################################################### - -Project: "gdcmTest"=.\TEST\WIN32\gdcmTest.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name gdcmdll - End Project Dependency -}}} - -############################################################################### - -Project: "gdcmTestDicomDir"=.\TEST\WIN32\gdcmTestDicomDir.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name gdcmdll - End Project Dependency -}}} - -############################################################################### - -Project: "gdcmTestDicomDir2"=.\TEST\WIN32\gdcmTestDicomDir2.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name gdcmdll - End Project Dependency -}}} - -############################################################################### - -Project: "gdcmdll"=.\src\win32\gdcmdll.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name libgdcmljpeg - End Project Dependency - Begin Project Dependency - Project_Dep_Name libgdcmijpeg8 - End Project Dependency - Begin Project Dependency - Project_Dep_Name libgdcmijpeg12 - End Project Dependency -}}} - -############################################################################### - -Project: "gdcmpyembedded"=.\gdcmPython\win32\gdcmpyembedded.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name libgdcmljpeg - End Project Dependency - Begin Project Dependency - Project_Dep_Name libgdcmijpeg8 - End Project Dependency - Begin Project Dependency - Project_Dep_Name libgdcmijpeg12 - End Project Dependency -}}} - -############################################################################### - -Project: "libgdcmijpeg12"=.\SRC\WIN32\libgdcmijpeg12.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "libgdcmijpeg8"=.\SRC\WIN32\libgdcmijpeg8.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "libgdcmljpeg"=.\SRC\WIN32\libgdcmljpeg.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "vtkGdcmTest"=.\VTK\WIN32\vtkGdcmTest.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name vtkgdcm - End Project Dependency -}}} - -############################################################################### - -Project: "vtkgdcm"=.\VTK\WIN32\vtkgdcm.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name libgdcmljpeg - End Project Dependency - Begin Project Dependency - Project_Dep_Name libgdcmijpeg8 - End Project Dependency - Begin Project Dependency - Project_Dep_Name libgdcmijpeg12 - End Project Dependency -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/MANIFEST.in b/gdcmPython/SetupOldies/MANIFEST.in similarity index 100% rename from MANIFEST.in rename to gdcmPython/SetupOldies/MANIFEST.in diff --git a/WrapSwig.py b/gdcmPython/SetupOldies/WrapSwig.py similarity index 100% rename from WrapSwig.py rename to gdcmPython/SetupOldies/WrapSwig.py diff --git a/WrapVTK.py b/gdcmPython/SetupOldies/WrapVTK.py similarity index 100% rename from WrapVTK.py rename to gdcmPython/SetupOldies/WrapVTK.py diff --git a/distutilsWrapping.py b/gdcmPython/SetupOldies/distutilsWrapping.py similarity index 100% rename from distutilsWrapping.py rename to gdcmPython/SetupOldies/distutilsWrapping.py diff --git a/gdcmVersion.py b/gdcmPython/gdcmVersion.py similarity index 100% rename from gdcmVersion.py rename to gdcmPython/gdcmVersion.py diff --git a/python.m4 b/python.m4 deleted file mode 100644 index 6b6caee9..00000000 --- a/python.m4 +++ /dev/null @@ -1,129 +0,0 @@ -## ------------------------ -## Python file handling -## From Andrew Dalke -## Updated by James Henstridge -## ------------------------ - -# AM_PATH_PYTHON([MINIMUM-VERSION]) - -# Adds support for distributing Python modules and packages. To -# install modules, copy them to $(pythondir), using the python_PYTHON -# automake variable. To install a package with the same name as the -# automake package, install to $(pkgpythondir), or use the -# pkgpython_PYTHON automake variable. - -# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as -# locations to install python extension modules (shared libraries). -# Another macro is required to find the appropriate flags to compile -# extension modules. - -# If your package is configured with a different prefix to python, -# users will have to add the install directory to the PYTHONPATH -# environment variable, or create a .pth file (see the python -# documentation for details). - -# If the MINIUMUM-VERSION argument is passed, AM_PATH_PYTHON will -# cause an error if the version of python installed on the system -# doesn't meet the requirement. MINIMUM-VERSION should consist of -# numbers and dots only. - - -AC_DEFUN([AM_PATH_PYTHON], - [ - dnl Find a version of Python. I could check for python versions 1.4 - dnl or earlier, but the default installation locations changed from - dnl $prefix/lib/site-python in 1.4 to $prefix/lib/python1.5/site-packages - dnl in 1.5, and I don't want to maintain that logic. - - AC_PATH_PROG(PYTHON, python2 python2.1 python2.0 python python1.6 python1.5) - - dnl should we do the version check? - ifelse([$1],[],,[ - AC_MSG_CHECKING(if Python version >= $1) - changequote(<<, >>)dnl - prog=" -import sys, string -minver = '$1' -pyver = string.split(sys.version)[0] # first word is version string -# split strings by '.' and convert to numeric -minver = map(string.atoi, string.split(minver, '.')) -pyver = map(string.atoi, string.split(pyver, '.')) -# we can now do comparisons on the two lists: -if pyver >= minver: - sys.exit(0) -else: - sys.exit(1)" - changequote([, ])dnl - if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC - then - AC_MSG_RESULT(okay) - else - AC_MSG_ERROR(too old) - fi - ]) - - AC_MSG_CHECKING([local Python configuration]) - - dnl Query Python for its version number. Getting [:3] seems to be - dnl the best way to do this; it's what "site.py" does in the standard - dnl library. Need to change quote character because of [:3] - - AC_SUBST(PYTHON_VERSION) - changequote(<<, >>)dnl - PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[:3]"` - changequote([, ])dnl - - - dnl Use the values of $prefix and $exec_prefix for the corresponding - dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made - dnl distinct variables so they can be overridden if need be. However, - dnl general consensus is that you shouldn't need this ability. - - AC_SUBST(PYTHON_PREFIX) - PYTHON_PREFIX='${prefix}' - - AC_SUBST(PYTHON_EXEC_PREFIX) - PYTHON_EXEC_PREFIX='${exec_prefix}' - - dnl At times (like when building shared libraries) you may want - dnl to know which OS platform Python thinks this is. - - AC_SUBST(PYTHON_PLATFORM) - PYTHON_PLATFORM=`$PYTHON -c "import sys; print sys.platform"` - - - dnl Set up 4 directories: - - dnl pythondir -- where to install python scripts. This is the - dnl site-packages directory, not the python standard library - dnl directory like in previous automake betas. This behaviour - dnl is more consistent with lispdir.m4 for example. - dnl - dnl Also, if the package prefix isn't the same as python's prefix, - dnl then the old $(pythondir) was pretty useless. - - AC_SUBST(pythondir) - pythondir=$PYTHON_PREFIX"/lib/python"$PYTHON_VERSION/site-packages - - dnl pkgpythondir -- $PACKAGE directory under pythondir. Was - dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is - dnl more consistent with the rest of automake. - dnl Maybe this should be put in python.am? - - AC_SUBST(pkgpythondir) - pkgpythondir=\${pythondir}/$PACKAGE - - dnl pyexecdir -- directory for installing python extension modules - dnl (shared libraries) Was PYTHON_SITE_EXEC in previous betas. - - AC_SUBST(pyexecdir) - pyexecdir=$PYTHON_EXEC_PREFIX"/lib/python"$PYTHON_VERSION/site-packages - - dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) - dnl Maybe this should be put in python.am? - - AC_SUBST(pkgpyexecdir) - pkgpyexecdir=\${pyexecdir}/$PACKAGE - - AC_MSG_RESULT([looks good]) -]) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0e22d479..f007aca0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -45,7 +45,7 @@ SET(libgdcm_la_SOURCES gdcmDicomDirSerie.cxx gdcmDicomDirImage.cxx gdcmDicomDirObject.cxx - gdcmPixelStuff.cxx + gdcmPixelConvert.cxx ) ADD_LIBRARY(gdcm ${libgdcm_la_SOURCES} ) diff --git a/src/Makefile.am b/src/Makefile.am deleted file mode 100644 index 8b4d3a1b..00000000 --- a/src/Makefile.am +++ /dev/null @@ -1,75 +0,0 @@ -SUBDIRS = jpeg - -LTVERSION = 0:1:0 - -lib_LTLIBRARIES = libgdcm.la - -CXXFLAGS = @CXXFLAGS@ -DPUB_DICT_PATH=\"$(datadir)/gdcm/\" \ - -D__STDC_LIMIT_MACROS # Refer to stdint.h - -libgdcm_la_LIBADD = \ - $(top_builddir)/src/jpeg/libijg12/libgdcmijpeg12.la \ - $(top_builddir)/src/jpeg/libijg8/libgdcmijpeg8.la \ - $(top_builddir)/src/jpeg/ljpg/libgdcmjpg.la - -libgdcm_la_SOURCES= \ - gdcmDebug.cxx \ - gdcmDicomDir.cxx \ - gdcmDicomDirElement.cxx \ - gdcmDicomDirImage.cxx \ - gdcmDicomDirMeta.cxx \ - gdcmDicomDirPatient.cxx \ - gdcmDicomDirSerie.cxx \ - gdcmDicomDirStudy.cxx \ - gdcmDict.cxx \ - gdcmDictEntry.cxx \ - gdcmDictSet.cxx \ - gdcmDirList.cxx \ - gdcmException.cxx \ - gdcmFile.cxx \ - gdcmGlobal.cxx \ - gdcmHeader.cxx \ - gdcmHeaderEntry.cxx \ - gdcmHeaderHelper.cxx \ - gdcmJpeg12.cxx \ - gdcmJpeg2000.cxx \ - gdcmJpeg.cxx \ - gdcmObject.cxx \ - gdcmParsePixels.cxx \ - gdcmParser.cxx \ - gdcmRLE.cxx \ - gdcmTS.cxx \ - gdcmUtil.cxx \ - gdcmVR.cxx - - -libgdcmincludedir = $(includedir) -libgdcminclude_HEADERS = \ - gdcmCommon.h \ - gdcmDebug.h \ - gdcmDicomDir.h \ - gdcmDicomDirElement.h \ - gdcmDicomDirImage.h \ - gdcmDicomDirMeta.h \ - gdcmDicomDirPatient.h \ - gdcmDicomDirSerie.h \ - gdcmDicomDirStudy.h \ - gdcmDictEntry.h \ - gdcmDict.h \ - gdcmDictSet.h \ - gdcmDirList.h \ - gdcmException.h \ - gdcmFile.h \ - gdcmGlobal.h \ - gdcm.h \ - gdcmHeaderEntry.h \ - gdcmHeader.h \ - gdcmHeaderHelper.h \ - gdcmObject.h \ - gdcmParser.h \ - gdcmVR.h \ - gdcmTS.h - -EXTRA_DIST = \ - gdcmUtil.h - diff --git a/src/gdcmFile.cxx b/src/gdcmFile.cxx index 8c3cb279..62051158 100644 --- a/src/gdcmFile.cxx +++ b/src/gdcmFile.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmFile.cxx,v $ Language: C++ - Date: $Date: 2004/09/27 08:39:07 $ - Version: $Revision: 1.131 $ + Date: $Date: 2004/09/29 17:33:17 $ + Version: $Revision: 1.132 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -25,7 +25,6 @@ typedef std::pair IterHT; //------------------------------------------------------------------------- // Constructor / Destructor /** - * \ingroup gdcmFile * \brief Constructor dedicated to deal with the *pixels* area of a ACR/DICOMV3 * file (gdcmHeader only deals with the ... header) * Opens (in read only and when possible) an existing file and checks @@ -43,11 +42,10 @@ gdcmFile::gdcmFile(gdcmHeader *header) { Header = header; SelfHeader = false; - SaveInitialValues(); + Initialise(); } /** - * \ingroup gdcmFile * \brief Constructor dedicated to deal with the *pixels* area of a ACR/DICOMV3 * file (gdcmHeader only deals with the ... header) * Opens (in read only and when possible) an existing file and checks @@ -65,11 +63,30 @@ gdcmFile::gdcmFile(std::string const & filename ) { Header = new gdcmHeader( filename ); SelfHeader = true; + Initialise(); +} + +/** + * \brief Factorization for various forms of constructors. + */ +void gdcmFile::Initialise() +{ + if ( Header->IsReadable() ) + { + ImageDataSizeRaw = ComputeDecompressedPixelDataSizeFromHeader(); + if ( Header->HasLUT() ) + { + ImageDataSize = 3 * ImageDataSizeRaw; + } + else + { + ImageDataSize = ImageDataSizeRaw; + } + } SaveInitialValues(); } /** - * \ingroup gdcmFile * \brief canonical destructor * \note If the gdcmHeader was created by the gdcmFile constructor, * it is destroyed by the gdcmFile @@ -86,7 +103,6 @@ gdcmFile::~gdcmFile() } /** - * \ingroup gdcmFile * \brief Sets some initial values for the Constructor * \warning not end user intended */ @@ -112,8 +128,6 @@ void gdcmFile::SaveInitialValues() if ( Header->IsReadable() ) { - SetPixelDataSizeFromHeader(); - // the following values *may* be modified // by gdcmFile::GetImageDataIntoVectorRaw // we save their initial value. @@ -138,7 +152,6 @@ void gdcmFile::SaveInitialValues() } /** - * \ingroup gdcmFile * \brief restores some initial values * \warning not end user intended */ @@ -182,7 +195,6 @@ void gdcmFile::RestoreInitialValues() } /** - * \ingroup gdcmFile * \brief delete initial values (il they were saved) * of InitialLutDescriptors and InitialLutData */ @@ -212,62 +224,6 @@ void gdcmFile::DeleteInitialValues() delete InitialBlueLUTData; } -/** - * \ingroup gdcmFile - * \brief drop palette related initial values -if any- - * (InitialLutDescriptors and InitialLutData) - * out of header, to make it consistent with the Pixel_Data - * as it's loaded in memory - */ - -//FIXME : Should be nice, if we could let it here. -// will be moved to PixelData class -// Now, the job is done in gdcmHeader.cxx - - /* -void gdcmFile::DropInitialValues() -{ - gdcmHeader* h=GetHeader(); - if ( GetEntryByNumber(0x0028,0x0002).c_str()[0] == '3' ) - { - // if SamplesPerPixel = 3, sure we don't need any LUT ! - // Drop 0028|1101, 0028|1102, 0028|1103 - // Drop 0028|1201, 0028|1202, 0028|1203 - - gdcmDocEntry* e = h->GetDocEntryByNumber(0x0028,0x01101); - if (e) - { - h->RemoveEntryNoDestroy(e); - } - e = h->GetDocEntryByNumber(0x0028,0x1102); - if (e) - { - h->RemoveEntryNoDestroy(e); - } - e = h->GetDocEntryByNumber(0x0028,0x1103); - if (e) - { - h->RemoveEntryNoDestroy(e); - } - e = h->GetDocEntryByNumber(0x0028,0x01201); - if (e) - { - h->RemoveEntryNoDestroy(e); - } - e = h->GetDocEntryByNumber(0x0028,0x1202); - if (e) - { - h->RemoveEntryNoDestroy(e); - } - e = h->GetDocEntryByNumber(0x0028,0x1203); - if (e) - { - h->RemoveEntryNoDestroy(e); - } - } -} -*/ - //----------------------------------------------------------------------------- // Print @@ -275,14 +231,12 @@ void gdcmFile::DropInitialValues() // Public /** - * \ingroup gdcmFile * \brief computes the length (in bytes) we must ALLOCATE to receive the * image(s) pixels (multiframes taken into account) * \warning : it is NOT the group 7FE0 length * (no interest for compressed images). - * \warning : not end user intended ? */ -void gdcmFile::SetPixelDataSizeFromHeader() +int gdcmFile::ComputeDecompressedPixelDataSizeFromHeader() { // see PS 3.3-2003 : C.7.6.3.2.1 // @@ -311,38 +265,22 @@ void gdcmFile::SetPixelDataSizeFromHeader() // 0028|1203 [US] [Blue Palette Color Lookup Table Data] // Number of "Bits Allocated" - int nb; - std::string str_nb = Header->GetEntryByNumber(0x0028,0x0100); - - if ( str_nb == GDCM_UNFOUND ) + int numberBitsAllocated = Header->GetBitsAllocated(); + if ( ( numberBitsAllocated == 0 ) || ( numberBitsAllocated == 12 ) ) { - nb = 16; + numberBitsAllocated = 16; } - else - { - nb = atoi( str_nb.c_str() ); - if (nb == 12) - { - nb =16; - } - } - ImageDataSize = - ImageDataSizeRaw = Header->GetXSize() * Header->GetYSize() - * Header->GetZSize() * (nb/8) * Header->GetSamplesPerPixel(); - std::string str_PhotometricInterpretation = - Header->GetEntryByNumber(0x0028,0x0004); - - // if ( str_PhotometricInterpretation == "PALETTE COLOR " ), - // pb when undealt Segmented Palette Color + + int DecompressedSize = Header->GetXSize() + * Header->GetYSize() + * Header->GetZSize() + * ( numberBitsAllocated / 8 ) + * Header->GetSamplesPerPixel(); - if ( Header->HasLUT() ) - { - ImageDataSize *= 3; - } + return DecompressedSize; } /** - * \ingroup gdcmFile * \brief - Allocates necessary memory, * - Reads the pixels from disk (uncompress if necessary), * - Transforms YBR pixels, if any, into RGB pixels @@ -384,7 +322,6 @@ uint8_t* gdcmFile::GetImageData() } /** - * \ingroup gdcmFile * \brief * Read the pixels from disk (uncompress if necessary), * Transforms YBR pixels, if any, into RGB pixels @@ -468,7 +405,6 @@ size_t gdcmFile::GetImageDataIntoVector (void* destination, size_t maxSize) } /** - * \ingroup gdcmFile * \brief Allocates necessary memory, * Transforms YBR pixels (if any) into RGB pixels * Transforms 3 planes R, G, B (if any) into a single RGB Plane @@ -516,7 +452,6 @@ uint8_t* gdcmFile::GetImageDataRaw () } /** - * \ingroup gdcmFile * \brief Copies at most MaxSize bytes of pixel data to caller's * memory space. * \warning This function was designed to avoid people that want to build @@ -541,8 +476,6 @@ uint8_t* gdcmFile::GetImageDataRaw () */ size_t gdcmFile::GetImageDataIntoVectorRaw (void* destination, size_t maxSize) { - int nb, nbu, highBit, sign; - // we save the initial values of the following // in order to be able to restore the header in a disk-consistent state // (if user asks twice to get the pixels from disk) @@ -564,64 +497,43 @@ size_t gdcmFile::GetImageDataIntoVectorRaw (void* destination, size_t maxSize) ReadPixelData( destination ); // Number of Bits Allocated for storing a Pixel - std::string str_nb = Header->GetEntryByNumber(0x0028,0x0100); - if ( str_nb == GDCM_UNFOUND ) + int numberBitsAllocated = Header->GetBitsAllocated(); + if ( numberBitsAllocated == 0 ) { - nb = 16; - } - else - { - nb = atoi( str_nb.c_str() ); - // FIXME - // From reading SetPixelDataSizeFromHeader, it seems 12 should be treated - // separately, correct ? + numberBitsAllocated = 16; } // Number of Bits actually used - std::string str_nbu = Header->GetEntryByNumber(0x0028,0x0101); - if ( str_nbu == GDCM_UNFOUND ) + int numberBitsStored = Header->GetBitsStored(); + if ( numberBitsStored == 0 ) { - nbu = nb; - } - else - { - nbu = atoi( str_nbu.c_str() ); + numberBitsStored = numberBitsAllocated; } // High Bit Position - std::string str_highBit = Header->GetEntryByNumber(0x0028,0x0102); - if ( str_highBit == GDCM_UNFOUND ) + int highBitPosition = Header->GetHighBitPosition(); + if ( highBitPosition == 0 ) { - highBit = nb - 1; + highBitPosition = numberBitsAllocated - 1; } - else - { - highBit = atoi( str_highBit.c_str() ); - } - // Pixel sign - // 0 = Unsigned - // 1 = Signed - std::string str_sign = Header->GetEntryByNumber(0x0028,0x0103); - if ( str_sign == GDCM_UNFOUND ) - { - sign = 0; // default is unsigned - } - else - { - sign = atoi( str_sign.c_str() ); - } + bool signedPixel = Header->IsSignedPixelData(); - // re arange bytes inside the integer (processor endianity) - if ( nb != 8 ) +// SPLIT ME +//////////////////////////////////////////////////////// +// ENDIANITY SECTION: re-arange bytes inside the integer + if ( numberBitsAllocated != 8 ) { - SwapZone(destination, Header->GetSwapCode(), ImageDataSize, nb); + SwapZone( destination, Header->GetSwapCode(), ImageDataSize, + numberBitsAllocated ); } // to avoid pb with some xmedcon breakers images - if ( nb == 16 && nbu < nb && sign == 0) + if ( ( numberBitsAllocated == 16 ) + && ( numberBitsStored < numberBitsAllocated ) + && ( ! signedPixel ) ) { - int l = (int)(ImageDataSize / (nb/8)); + int l = (int)(ImageDataSize / (numberBitsAllocated/8)); uint16_t *deb = (uint16_t *)destination; for(int i = 0; i> (nb-nbu); + mask = mask >> ( numberBitsAllocated - numberBitsStored ); uint16_t *deb = (uint16_t *)destination; for(int i = 0; i> (nbu - highBit - 1)) & mask; + *deb = (*deb >> (numberBitsStored - highBitPosition - 1)) & mask; deb++; } } - else if ( nb == 32 ) + else if ( numberBitsAllocated == 32 ) { uint32_t mask = 0xffffffff; - mask = mask >> (nb - nbu); + mask = mask >> ( numberBitsAllocated - numberBitsStored ); uint32_t *deb = (uint32_t *)destination; for(int i = 0; i> (nbu - highBit - 1)) & mask; + *deb = (*deb >> (numberBitsStored - highBitPosition - 1)) & mask; deb++; } } @@ -665,24 +579,22 @@ size_t gdcmFile::GetImageDataIntoVectorRaw (void* destination, size_t maxSize) return 0; } } -/// \todo -/// DO NOT remove this code commented out. -/// Nobody knows what's expecting you ... -/// Just to 'see' what was actually read on disk :-( -/// -/// FILE* f2; -/// f2 = fopen("SpuriousFile.RAW","wb"); -/// fwrite(destination,ImageDataSize,1,f2); -/// fclose(f2); - - // Deal with the color - // ------------------- - - std::string str_PhotometricInterpretation = - Header->GetEntryByNumber(0x0028,0x0004); - if ( str_PhotometricInterpretation == "MONOCHROME1 " - || str_PhotometricInterpretation == "MONOCHROME2 " ) +#ifdef GDCM_DEBUG + FILE* DebugFile; + DebugFile = fopen( "SpuriousFile.RAW", "wb" ); + fwrite( PixelConvertor.GetUncompressed(), + PixelConvertor.GetUncompressedsSize(), + 1, DebugFile ); + fclose( DebugFile ); +#endif //GDCM_DEBUG + +// SPLIT ME +////////////////////////////////// +// Deal with the color + + // Monochrome pictures don't require color intervention + if ( Header->IsMonochrome() ) { return ImageDataSize; } @@ -700,7 +612,7 @@ size_t gdcmFile::GetImageDataIntoVectorRaw (void* destination, size_t maxSize) // Whatever Planar Configuration is, // "PALETTE COLOR " implies that we deal with the palette. - if ( str_PhotometricInterpretation == "PALETTE COLOR ") + if ( Header->IsPaletteColor() ) { planConf = 2; } @@ -711,7 +623,7 @@ size_t gdcmFile::GetImageDataIntoVectorRaw (void* destination, size_t maxSize) // Pixels are already RGB break; case 1: - if (str_PhotometricInterpretation == "YBR_FULL") + if ( Header->IsYBRFull() ) { // Warning : YBR_FULL_422 acts as RGB // : we need to make RGB Pixels from Planes Y,cB,cR @@ -811,12 +723,13 @@ size_t gdcmFile::GetImageDataIntoVectorRaw (void* destination, size_t maxSize) } /** - * \ingroup gdcmFile - * \brief performs a shalow copy (not a deep copy) of the user given - * pixel area. - * 'image' Pixels are presented as C-like 2D arrays : line per line. - * 'volume'Pixels are presented as C-like 3D arrays : plane per plane - * \warning user is kindly requested NOT TO 'free' the Pixel area + * \brief Points the internal Pixel_Data pointer to the callers inData + * image representation, BUT WITHOUT COPYING THE DATA. + * 'image' Pixels are presented as C-like 2D arrays : line per line. + * 'volume'Pixels are presented as C-like 3D arrays : plane per plane + * \warning Since the pixels are not copied, it is the caller's responsability + * not to deallocate it's data before gdcm uses them (e.g. with + * the Write() method. * @param inData user supplied pixel area * @param expectedSize total image size, in Bytes * @@ -834,7 +747,6 @@ bool gdcmFile::SetImageData(uint8_t* inData, size_t expectedSize) } /** - * \ingroup gdcmFile * \brief Writes on disk A SINGLE Dicom file * NO test is performed on processor "Endiannity". * It's up to the user to call his Reader properly @@ -858,7 +770,6 @@ bool gdcmFile::WriteRawData(std::string const & fileName) } /** - * \ingroup gdcmFile * \brief Writes on disk A SINGLE Dicom file, * using the Implicit Value Representation convention * NO test is performed on processor "Endiannity". @@ -873,7 +784,6 @@ bool gdcmFile::WriteDcmImplVR (std::string const & fileName) } /** - * \ingroup gdcmFile * \brief Writes on disk A SINGLE Dicom file, * using the Explicit Value Representation convention * NO test is performed on processor "Endiannity". * @param fileName name of the file to be created @@ -887,7 +797,6 @@ bool gdcmFile::WriteDcmExplVR (std::string const & fileName) } /** - * \ingroup gdcmFile * \brief Writes on disk A SINGLE Dicom file, * using the ACR-NEMA convention * NO test is performed on processor "Endiannity". @@ -909,7 +818,6 @@ bool gdcmFile::WriteAcr (std::string const & fileName) //----------------------------------------------------------------------------- // Protected /** - * \ingroup gdcmFile * \brief NOT a end user inteded function * (used by WriteDcmExplVR, WriteDcmImplVR, WriteAcr, etc) * @param fileName name of the file to be created @@ -1004,7 +912,6 @@ bool gdcmFile::WriteBase (std::string const & fileName, FileType type) //----------------------------------------------------------------------------- // Private /** - * \ingroup gdcmFile * \brief Swap the bytes, according to swap code. * \warning not end user intended * @param im area to deal with @@ -1088,7 +995,6 @@ void gdcmFile::SwapZone(void* im, int swap, int lgr, int nb) } /** - * \ingroup gdcmFile * \brief Read pixel data from disk (optionaly decompressing) into the * caller specified memory location. * @param destination where the pixel data should be stored. diff --git a/src/gdcmFile.h b/src/gdcmFile.h index 837b2d00..adada47f 100644 --- a/src/gdcmFile.h +++ b/src/gdcmFile.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmFile.h,v $ Language: C++ - Date: $Date: 2004/09/27 08:39:07 $ - Version: $Revision: 1.52 $ + Date: $Date: 2004/09/29 17:33:17 $ + Version: $Revision: 1.53 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -39,18 +39,12 @@ public: /// Accessor to \ref Header gdcmHeader* GetHeader() { return Header; } - void SetPixelDataSizeFromHeader(); + int ComputeDecompressedPixelDataSizeFromHeader(); - -/// \brief Returns the size (in bytes) of required memory to hold -/// the pixel data represented in this file. + /// Accessor to \ref ImageDataSize size_t GetImageDataSize(){ return ImageDataSize; }; - -/// \brief Returns the size (in bytes) of required memory to hold -/// the pixel data represented in this file, if user DOESN'T want -/// to get RGB pixels image when it's stored as a PALETTE COLOR image -/// -the (vtk) user is supposed to know how to deal with LUTs- + /// Accessor to \ref ImageDataSizeRaw size_t GetImageDataSizeRaw(){ return ImageDataSizeRaw; }; uint8_t* GetImageData(); @@ -58,12 +52,6 @@ public: uint8_t* GetImageDataRaw(); size_t GetImageDataIntoVectorRaw(void* destination, size_t maxSize); - // Allocates ExpectedSize bytes of memory at this->Data and copies the - // pointed data to it. Copying the image might look useless but - // the caller might destroy it's image (without knowing it: think - // of a complicated interface where display is done with a library - // e.g. VTK) before calling the Write - // see also gdcmHeader::SetImageDataSize ?!? bool SetImageData (uint8_t* data, size_t expectedSize); @@ -93,6 +81,7 @@ protected: bool WriteBase(std::string const& fileName, FileType type); private: + void Initialise(); void SwapZone(void* im, int swap, int lgr, int nb); bool ReadPixelData(void* destination); @@ -138,20 +127,23 @@ private: /// wether already parsed bool Parsed; - // - // --------------- Will be moved to a gdcmPixelData class - // +// +// --------------- Will be moved to a gdcmPixelData class +// /// \brief to hold the Pixels (when read) uint8_t* Pixel_Data; // (was PixelData) - /// \brief Area length to receive the Gray Level pixels + /// \brief Size (in bytes) of required memory to hold the Gray Level pixels + /// represented in this file. This is used when the user DOESN'T want + /// the RGB pixels image when it's stored as a PALETTE COLOR image size_t ImageDataSizeRaw; - /// \brief Area length to receive the pixels making RGB - /// from Plane R, Plane G, Plane B - /// or from Grey Plane + Palette Color - /// or from YBR Pixels (or from RGB Pixels, as well) + /// \brief Size (in bytes) of requited memory to hold the the pixels + /// of this image in it's RGB convertion either from: + /// - Plane R, Plane G, Plane B + /// - Grey Plane + Palette Color + /// - YBR Pixels (or from RGB Pixels, as well) size_t ImageDataSize; /// \brief ==1 if GetImageDataRaw was used @@ -164,8 +156,6 @@ private: size_t LastAllocatedPixelDataLength; // Initial values of some fields that can be modified during reading process - // (in a future stage, they will be modified just before the writting process - // and restored just after) // if user asked to transform gray level + LUT image into RGB image /// \brief Samples Per Pixel (0x0028,0x0002), as found on disk @@ -176,8 +166,6 @@ private: std::string InitialPlanConfig; // Initial values of some fields that can be modified during reading process - // (in a future stage, they will be modified just before the writting process - // and restored just after) // if the image was a 'strange' ACR-NEMA // (Bits Allocated=12, High Bit not equal to Bits stored +1) /// \brief Bits Allocated (0x0028,0x0100), as found on disk @@ -186,8 +174,6 @@ private: std::string InitialHighBit; // some DocEntry that can be moved out of the H table during reading process - // (in a future stage, they will be modified just before the writting process - // and restored just after) // if user asked to transform gray level + LUT image into RGB image // We keep a pointer on them for a future use. @@ -205,9 +191,9 @@ private: /// \brief Blue Palette Color Lookup Table Data 0028 1203 as read gdcmDocEntry* InitialBlueLUTData; - // - // --------------- end of future gdcmPixelData class - // +// +// --------------- end of future gdcmPixelData class +// }; diff --git a/src/gdcmHeader.cxx b/src/gdcmHeader.cxx index 19ae8d4d..ca880bec 100644 --- a/src/gdcmHeader.cxx +++ b/src/gdcmHeader.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmHeader.cxx,v $ Language: C++ - Date: $Date: 2004/09/27 08:39:07 $ - Version: $Revision: 1.189 $ + Date: $Date: 2004/09/29 17:33:17 $ + Version: $Revision: 1.190 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -84,7 +84,6 @@ gdcmHeader::gdcmHeader() } /** - * \ingroup gdcmHeader * \brief Canonical destructor. */ gdcmHeader::~gdcmHeader () @@ -108,7 +107,7 @@ void gdcmHeader::Write(FILE* fp,FileType filetype) SetEntryByNumber("16", 0x0028,0x0100); } - // TODO : correct 'Pixel group' Length if necessary + /// \todo correct 'Pixel group' Length if necessary int i_lgPix = GetEntryLengthByNumber(GrPixel, NumPixel); if (i_lgPix != -2) @@ -231,7 +230,6 @@ int gdcmHeader::GetXSize() } /** - * \ingroup gdcmHeader * \brief Retrieve the number of lines of image. * \warning The defaulted value is 1 as opposed to gdcmHeader::GetXSize() * @return The encountered size when found, 1 by default @@ -255,7 +253,6 @@ int gdcmHeader::GetYSize() } /** - * \ingroup gdcmHeader * \brief Retrieve the number of planes of volume or the number * of frames of a multiframe. * \warning When present we consider the "Number of Frames" as the third @@ -284,7 +281,6 @@ int gdcmHeader::GetZSize() } /** - * \ingroup gdcmHeader * \brief gets the info from 0028,0030 : Pixel Spacing * else 1.0 * @return X dimension of a pixel @@ -321,7 +317,6 @@ float gdcmHeader::GetXSpacing() } /** - * \ingroup gdcmHeader * \brief gets the info from 0028,0030 : Pixel Spacing * else 1.0 * @return Y dimension of a pixel @@ -344,12 +339,11 @@ float gdcmHeader::GetYSpacing() } /** - *\ingroup gdcmHeader - *\brief gets the info from 0018,0088 : Space Between Slices - * else from 0018,0050 : Slice Thickness - * else 1.0 - * @return Z dimension of a voxel-to be - */ + * \brief gets the info from 0018,0088 : Space Between Slices + * else from 0018,0050 : Slice Thickness + * else 1.0 + * @return Z dimension of a voxel-to be + */ float gdcmHeader::GetZSpacing() { // Spacing Between Slices : distance entre le milieu de chaque coupe @@ -388,20 +382,21 @@ float gdcmHeader::GetZSpacing() } /** - *\ingroup gdcmHeader - *\brief gets the info from 0028,1052 : Rescale Intercept - * @return Rescale Intercept + *\brief gets the info from 0028,1052 : Rescale Intercept + * @return Rescale Intercept */ float gdcmHeader::GetRescaleIntercept() { float resInter = 0.; - std::string strRescInter = GetEntryByNumber(0x0028,0x1052); //0028 1052 DS IMG Rescale Intercept + /// 0028 1052 DS IMG Rescale Intercept + std::string strRescInter = GetEntryByNumber(0x0028,0x1052); if ( strRescInter != GDCM_UNFOUND ) { if( sscanf( strRescInter.c_str(), "%f", &resInter) != 1 ) { // bug in the element 0x0028,0x1052 - dbg.Verbose(0, "gdcmHeader::GetRescaleIntercept: Rescale Slope is empty"); + dbg.Verbose(0, "gdcmHeader::GetRescaleIntercept: Rescale Slope " + "is empty"); } } @@ -409,14 +404,14 @@ float gdcmHeader::GetRescaleIntercept() } /** - *\ingroup gdcmHeader - *\brief gets the info from 0028,1053 : Rescale Slope - * @return Rescale Slope + *\brief gets the info from 0028,1053 : Rescale Slope + * @return Rescale Slope */ float gdcmHeader::GetRescaleSlope() { float resSlope = 1.; - std::string strRescSlope = GetEntryByNumber(0x0028,0x1053); //0028 1053 DS IMG Rescale Slope + //0028 1053 DS IMG Rescale Slope + std::string strRescSlope = GetEntryByNumber(0x0028,0x1053); if ( strRescSlope != GDCM_UNFOUND ) { if( sscanf( strRescSlope.c_str(), "%f", &resSlope) != 1) @@ -430,13 +425,12 @@ float gdcmHeader::GetRescaleSlope() } /** - * \ingroup gdcmHeader - * \brief This function is intended to user who doesn't want - * to have to manage a LUT and expects to get an RBG Pixel image - * (or a monochrome one ...) - * \warning to be used with GetImagePixels() - * @return 1 if Gray level, 3 if Color (RGB, YBR or PALETTE COLOR) - */ + * \brief This function is intended to user who doesn't want + * to have to manage a LUT and expects to get an RBG Pixel image + * (or a monochrome one ...) + * \warning to be used with GetImagePixels() + * @return 1 if Gray level, 3 if Color (RGB, YBR or PALETTE COLOR) + */ int gdcmHeader::GetNumberOfScalarComponents() { if ( GetSamplesPerPixel() == 3 ) @@ -481,13 +475,12 @@ int gdcmHeader::GetNumberOfScalarComponents() } /** - * \ingroup gdcmHeader - * \brief This function is intended to user that DOESN'T want - * to get RGB pixels image when it's stored as a PALETTE COLOR image - * - the (vtk) user is supposed to know how deal with LUTs - - * \warning to be used with GetImagePixelsRaw() - * @return 1 if Gray level, 3 if Color (RGB or YBR - NOT 'PALETTE COLOR' -) - */ + * \brief This function is intended to user that DOESN'T want + * to get RGB pixels image when it's stored as a PALETTE COLOR image + * - the (vtk) user is supposed to know how deal with LUTs - + * \warning to be used with GetImagePixelsRaw() + * @return 1 if Gray level, 3 if Color (RGB or YBR - NOT 'PALETTE COLOR' -) + */ int gdcmHeader::GetNumberOfScalarComponentsRaw() { // 0028 0100 US IMG Bits Allocated @@ -518,12 +511,11 @@ int gdcmHeader::GetNumberOfScalarComponentsRaw() // /** - * \brief gets the info from 0020,0032 : Image Position Patient - * else from 0020,0030 : Image Position (RET) - * else 0. - * @return up-left image corner X position - */ - + * \brief gets the info from 0020,0032 : Image Position Patient + * else from 0020,0030 : Image Position (RET) + * else 0. + * @return up-left image corner X position + */ float gdcmHeader::GetXOrigin() { float xImPos, yImPos, zImPos; @@ -531,11 +523,13 @@ float gdcmHeader::GetXOrigin() if ( strImPos == GDCM_UNFOUND ) { - dbg.Verbose(0, "gdcmHeader::GetXImagePosition: unfound Image Position Patient (0020,0032)"); + dbg.Verbose(0, "gdcmHeader::GetXImagePosition: unfound Image " + "Position Patient (0020,0032)"); strImPos = GetEntryByNumber(0x0020,0x0030); // For ACR-NEMA images if ( strImPos == GDCM_UNFOUND ) { - dbg.Verbose(0, "gdcmHeader::GetXImagePosition: unfound Image Position (RET) (0020,0030)"); + dbg.Verbose(0, "gdcmHeader::GetXImagePosition: unfound Image " + "Position (RET) (0020,0030)"); /// \todo How to tell the caller nothing was found ? return 0.; } @@ -550,11 +544,11 @@ float gdcmHeader::GetXOrigin() } /** - * \brief gets the info from 0020,0032 : Image Position Patient - * else from 0020,0030 : Image Position (RET) - * else 0. - * @return up-left image corner Y position - */ + * \brief gets the info from 0020,0032 : Image Position Patient + * else from 0020,0030 : Image Position (RET) + * else 0. + * @return up-left image corner Y position + */ float gdcmHeader::GetYOrigin() { float xImPos, yImPos, zImPos; @@ -562,11 +556,13 @@ float gdcmHeader::GetYOrigin() if ( strImPos == GDCM_UNFOUND) { - dbg.Verbose(0, "gdcmHeader::GetYImagePosition: unfound Image Position Patient (0020,0032)"); + dbg.Verbose(0, "gdcmHeader::GetYImagePosition: unfound Image " + "Position Patient (0020,0032)"); strImPos = GetEntryByNumber(0x0020,0x0030); // For ACR-NEMA images if ( strImPos == GDCM_UNFOUND ) { - dbg.Verbose(0, "gdcmHeader::GetYImagePosition: unfound Image Position (RET) (0020,0030)"); + dbg.Verbose(0, "gdcmHeader::GetYImagePosition: unfound Image " + "Position (RET) (0020,0030)"); /// \todo How to tell the caller nothing was found ? return 0.; } @@ -581,13 +577,13 @@ float gdcmHeader::GetYOrigin() } /** - * \brief gets the info from 0020,0032 : Image Position Patient - * \ else from 0020,0030 : Image Position (RET) - * \ else from 0020,1041 : Slice Location - * \ else from 0020,0050 : Location - * \ else 0. - * @return up-left image corner Z position - */ + * \brief gets the info from 0020,0032 : Image Position Patient + * else from 0020,0030 : Image Position (RET) + * else from 0020,1041 : Slice Location + * else from 0020,0050 : Location + * else 0. + * @return up-left image corner Z position + */ float gdcmHeader::GetZOrigin() { float xImPos, yImPos, zImPos; @@ -597,7 +593,8 @@ float gdcmHeader::GetZOrigin() { if( sscanf( strImPos.c_str(), "%f\\%f\\%f", &xImPos, &yImPos, &zImPos) != 3) { - dbg.Verbose(0, "gdcmHeader::GetZImagePosition: wrong Image Position Patient (0020,0032)"); + dbg.Verbose(0, "gdcmHeader::GetZImagePosition: wrong Image " + "Position Patient (0020,0032)"); return 0.; // bug in the element 0x0020,0x0032 } else @@ -655,10 +652,9 @@ float gdcmHeader::GetZOrigin() } /** - * \brief gets the info from 0020,0013 : Image Number - * \ else 0. - * @return image number - */ + * \brief gets the info from 0020,0013 : Image Number else 0. + * @return image number + */ int gdcmHeader::GetImageNumber() { // The function i atoi() takes the address of an area of memory as @@ -667,7 +663,8 @@ int gdcmHeader::GetImageNumber() // be preferable to sscanf() since atoi() is a much smaller, simpler and // faster function. sscanf() can do all possible conversions whereas // atoi() can only do single decimal integer conversions. - std::string strImNumber = GetEntryByNumber(0x0020,0x0013); //0020 0013 IS REL Image Number + //0020 0013 IS REL Image Number + std::string strImNumber = GetEntryByNumber(0x0020,0x0013); if ( strImNumber != GDCM_UNFOUND ) { return atoi( strImNumber.c_str() ); @@ -676,9 +673,9 @@ int gdcmHeader::GetImageNumber() } /** - * \brief gets the info from 0008,0060 : Modality - * @return Modality Type - */ + * \brief gets the info from 0008,0060 : Modality + * @return Modality Type + */ ModalityType gdcmHeader::GetModality() { // 0008 0060 CS ID Modality @@ -738,7 +735,6 @@ ModalityType gdcmHeader::GetModality() } /** - * \ingroup gdcmHeader * \brief Retrieve the number of Bits Stored (actually used) * (as opposite to number of Bits Allocated) * @return The encountered number of Bits Stored, 0 by default. @@ -746,10 +742,11 @@ ModalityType gdcmHeader::GetModality() */ int gdcmHeader::GetBitsStored() { - std::string strSize = GetEntryByNumber(0x0028,0x0101); + std::string strSize = GetEntryByNumber( 0x0028, 0x0101 ); if ( strSize == GDCM_UNFOUND ) { - dbg.Verbose(0, "gdcmHeader::GetBitsStored: this is supposed to be mandatory"); + dbg.Verbose(0, "gdcmHeader::GetBitsStored: this is supposed to " + "be mandatory"); return 0; // It's supposed to be mandatory // the caller will have to check } @@ -757,7 +754,47 @@ int gdcmHeader::GetBitsStored() } /** - * \ingroup gdcmHeader + * \brief Retrieve the high bit position. + * \warning The method defaults to 0 when information is absent. + * The responsability of checking this value is left to the caller. + * @return The high bit positin when present. 0 when absent. + */ +int gdcmHeader::GetHighBitPosition() +{ + std::string strSize = GetEntryByNumber( 0x0028, 0x0102 ); + if ( strSize == GDCM_UNFOUND ) + { + dbg.Verbose(0, "gdcmHeader::GetHighBitPosition: this is supposed " + "to be mandatory"); + return 0; + } + return atoi( strSize.c_str() ); +} + +/** + * \brief Check wether the pixels are signed or UNsigned data. + * \warning The method defaults to false (UNsigned) when information is absent. + * The responsability of checking this value is left to the caller. + * @return True when signed, false when UNsigned + */ +bool gdcmHeader::IsSignedPixelData() +{ + std::string strSize = GetEntryByNumber( 0x0028, 0x0103 ); + if ( strSize == GDCM_UNFOUND ) + { + dbg.Verbose(0, "gdcmHeader::IsSignedPixelData: this is supposed " + "to be mandatory"); + return false; + } + int sign = atoi( strSize.c_str() ); + if ( sign == 0 ) + { + return false; + } + return true; +} + +/** * \brief Retrieve the number of Bits Allocated * (8, 12 -compacted ACR-NEMA files, 16, ...) * @return The encountered number of Bits Allocated, 0 by default. @@ -768,7 +805,8 @@ int gdcmHeader::GetBitsAllocated() std::string strSize = GetEntryByNumber(0x0028,0x0100); if ( strSize == GDCM_UNFOUND ) { - dbg.Verbose(0, "gdcmHeader::GetBitsStored: this is supposed to be mandatory"); + dbg.Verbose(0, "gdcmHeader::GetBitsStored: this is supposed to " + "be mandatory"); return 0; // It's supposed to be mandatory // the caller will have to check } @@ -776,7 +814,6 @@ int gdcmHeader::GetBitsAllocated() } /** - * \ingroup gdcmHeader * \brief Retrieve the number of Samples Per Pixel * (1 : gray level, 3 : RGB -1 or 3 Planes-) * @return The encountered number of Samples Per Pixel, 1 by default. @@ -787,7 +824,8 @@ int gdcmHeader::GetSamplesPerPixel() std::string strSize = GetEntryByNumber(0x0028,0x0002); if ( strSize == GDCM_UNFOUND ) { - dbg.Verbose(0, "gdcmHeader::GetBitsStored: this is supposed to be mandatory"); + dbg.Verbose(0, "gdcmHeader::GetBitsStored: this is supposed to " + "be mandatory"); return 1; // Well, it's supposed to be mandatory ... // but sometimes it's missing : *we* assume Gray pixels } @@ -795,7 +833,67 @@ int gdcmHeader::GetSamplesPerPixel() } /** - * \ingroup gdcmHeader + * \brief Check wether this a monochrome picture or not by accessing + * the "Photometric Interpretation" tag ( 0x0028, 0x0004 ). + * @return true when "MONOCHROME1" or "MONOCHROME2". False otherwise. + */ +bool gdcmHeader::IsMonochrome() +{ + std::string PhotometricInterp = GetEntryByNumber( 0x0028, 0x0004 ); + if ( PhotometricInterp == "MONOCHROME1 " + || PhotometricInterp == "MONOCHROME2 " ) + { + return true; + } + if ( PhotometricInterp == GDCM_UNFOUND ) + { + dbg.Verbose(0, "gdcmHeader::IsMonochrome: absent Photometric " + "Interpretation"); + } + return false; +} + +/** + * \brief Check wether this a "PALETTE COLOR" picture or not by accessing + * the "Photometric Interpretation" tag ( 0x0028, 0x0004 ). + * @return true when "PALETTE COLOR". False otherwise. + */ +bool gdcmHeader::IsPaletteColor() +{ + std::string PhotometricInterp = GetEntryByNumber( 0x0028, 0x0004 ); + if ( PhotometricInterp == "PALETTE COLOR " ) + { + return true; + } + if ( PhotometricInterp == GDCM_UNFOUND ) + { + dbg.Verbose(0, "gdcmHeader::IsPaletteColor: absent Photometric " + "Interpretation"); + } + return false; +} + +/** + * \brief Check wether this a "YBR_FULL" color picture or not by accessing + * the "Photometric Interpretation" tag ( 0x0028, 0x0004 ). + * @return true when "YBR_FULL". False otherwise. + */ +bool gdcmHeader::IsYBRFull() +{ + std::string PhotometricInterp = GetEntryByNumber( 0x0028, 0x0004 ); + if ( PhotometricInterp == "YBR_FULL" ) + { + return true; + } + if ( PhotometricInterp == GDCM_UNFOUND ) + { + dbg.Verbose(0, "gdcmHeader::IsYBRFull: absent Photometric " + "Interpretation"); + } + return false; +} + +/** * \brief Retrieve the Planar Configuration for RGB images * (0 : RGB Pixels , 1 : R Plane + G Plane + B Plane) * @return The encountered Planar Configuration, 0 by default. @@ -811,10 +909,9 @@ int gdcmHeader::GetPlanarConfiguration() } /** - * \ingroup gdcmHeader * \brief Return the size (in bytes) of a single pixel of data. * @return The size in bytes of a single pixel of data; 0 by default - * 0 means the file is NOT USABLE; the caller will have to check + * 0 means the file is NOT USABLE; the caller will have to check */ int gdcmHeader::GetPixelSize() { @@ -845,7 +942,6 @@ int gdcmHeader::GetPixelSize() } /** - * \ingroup gdcmHeader * \brief Build the Pixel Type of the image. * Possible values are: * - 8U unsigned 8 bit, @@ -883,7 +979,7 @@ std::string gdcmHeader::GetPixelType() bitsAlloc = "8"; // by old RGB images) } - std::string sign = GetEntryByNumber(0x0028, 0x0103); // "Pixel Representation" + std::string sign = GetEntryByNumber(0x0028, 0x0103);//"Pixel Representation" if (sign == GDCM_UNFOUND ) { @@ -903,7 +999,6 @@ std::string gdcmHeader::GetPixelType() /** - * \ingroup gdcmHeader * \brief Recover the offset (from the beginning of the file) * of *image* pixels (not *icone image* pixels, if any !) * @return Pixel Offset @@ -926,9 +1021,8 @@ size_t gdcmHeader::GetPixelOffset() } } -// TODO : unify those two (previous one and next one) +/// \todo TODO : unify those two (previous one and next one) /** - * \ingroup gdcmHeader * \brief Recover the pixel area length (in Bytes) * @return Pixel Element Length, as stored in the header * (NOT the memory space necessary to hold the Pixels @@ -954,7 +1048,6 @@ size_t gdcmHeader::GetPixelAreaLength() } /** - * \ingroup gdcmHeader * \brief tells us if LUT are used * \warning Right now, 'Segmented xxx Palette Color Lookup Table Data' * are NOT considered as LUT, since nobody knows @@ -1002,7 +1095,6 @@ bool gdcmHeader::HasLUT() } /** - * \ingroup gdcmHeader * \brief gets the info from 0028,1101 : Lookup Table Desc-Red * else 0 * @return Lookup Table number of Bits , 0 by default @@ -1014,7 +1106,8 @@ int gdcmHeader::GetLUTNbits() std::vector tokens; int lutNbits; - //Just hope Lookup Table Desc-Red = Lookup Table Desc-Red = Lookup Table Desc-Blue + //Just hope Lookup Table Desc-Red = Lookup Table Desc-Red + // = Lookup Table Desc-Blue // Consistency already checked in GetLUTLength std::string lutDescription = GetEntryByNumber(0x0028,0x1101); if ( lutDescription == GDCM_UNFOUND ) @@ -1034,7 +1127,6 @@ int gdcmHeader::GetLUTNbits() } /** - * \ingroup gdcmHeader * \brief builts Red/Green/Blue/Alpha LUT from Header * when (0028,0004),Photometric Interpretation = [PALETTE COLOR ] * and (0028,1101),(0028,1102),(0028,1102) @@ -1207,7 +1299,8 @@ std::string gdcmHeader::GetTransfertSyntaxName() // use the gdcmTS (TS : Transfert Syntax) std::string transfertSyntax = GetEntryByNumber(0x0002,0x0010); - if ( transfertSyntax == GDCM_NOTLOADED ) { // fusible + if ( transfertSyntax == GDCM_NOTLOADED ) + { std::cout << "Transfert Syntax not loaded. " << std::endl << "Better you increase MAX_SIZE_LOAD_ELEMENT_VALUE" << std::endl; @@ -1354,8 +1447,8 @@ void gdcmHeader::GetImageOrientationPatient( float iop[6] ) if( sscanf( strImOriPat.c_str(), "%f\\%f\\%f\\%f\\%f\\%f", &iop[0], &iop[1], &iop[2], &iop[3], &iop[4], &iop[5]) != 6 ) { - dbg.Verbose(0, "gdcmHeader::GetImageOrientationPatient: wrong Image Orientation Patient (0020,0037)"); - // bug in the element 0x0020,0x0037 + dbg.Verbose(0, "gdcmHeader::GetImageOrientationPatient: " + "wrong Image Orientation Patient (0020,0037)"); } } //For ACR-NEMA @@ -1365,8 +1458,8 @@ void gdcmHeader::GetImageOrientationPatient( float iop[6] ) if( sscanf( strImOriPat.c_str(), "%f\\%f\\%f\\%f\\%f\\%f", &iop[0], &iop[1], &iop[2], &iop[3], &iop[4], &iop[5]) != 6 ) { - dbg.Verbose(0, "gdcmHeader::GetImageOrientationPatient: wrong Image Orientation Patient (0020,0035)"); - // bug in the element 0x0020,0x0035 + dbg.Verbose(0, "gdcmHeader::GetImageOrientationPatient: " + "wrong Image Orientation Patient (0020,0035)"); } } } diff --git a/src/gdcmHeader.h b/src/gdcmHeader.h index 196313bb..8940f0e3 100644 --- a/src/gdcmHeader.h +++ b/src/gdcmHeader.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmHeader.h,v $ Language: C++ - Date: $Date: 2004/09/27 08:39:07 $ - Version: $Revision: 1.87 $ + Date: $Date: 2004/09/29 17:33:17 $ + Version: $Revision: 1.88 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -121,6 +121,11 @@ public: int GetSamplesPerPixel(); int GetPlanarConfiguration(); int GetPixelSize(); + int GetHighBitPosition(); + bool IsSignedPixelData(); + bool IsMonochrome(); + bool IsPaletteColor(); + bool IsYBRFull(); std::string GetPixelType(); size_t GetPixelOffset(); diff --git a/src/gdcmPixelConvert.cxx b/src/gdcmPixelConvert.cxx new file mode 100644 index 00000000..5923d8de --- /dev/null +++ b/src/gdcmPixelConvert.cxx @@ -0,0 +1,206 @@ +/*========================================================================= + + Program: gdcm + Module: $RCSfile: gdcmPixelConvert.cxx,v $ + Language: C++ + Date: $Date: 2004/09/29 17:33:17 $ + Version: $Revision: 1.1 $ + + Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de + l'Image). All rights reserved. See Doc/License.txt or + http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +////// #include +#define str2num(str, typeNum) *((typeNum *)(str)) + +#include "gdcmDebug.h" +#include "gdcmPixelConvert.h" + + +//----------------------------------------------------------------------------- +// Constructor / Destructor +gdcmPixelConvert::gdcmPixelConvert() +{ + RGB = 0; + RGBSize = 0; + Uncompressed = 0; + UncompressedSize = 0; +} + +void gdcmPixelConvert::Squeeze() +{ + if ( RGB ) { + delete [] RGB; + } + if ( Uncompressed ) { + delete [] Uncompressed; + } +} + +gdcmPixelConvert::~gdcmPixelConvert() +{ + Squeeze(); +} + +void gdcmPixelConvert::AllocateRGB() +{ + if ( RGB ) { + delete [] RGB; + } + RGB = new uint8_t[RGBSize]; +} + +void gdcmPixelConvert::AllocateUncompressed() +{ + if ( Uncompressed ) { + delete [] Uncompressed; + } + Uncompressed = new uint8_t[ UncompressedSize ]; +} + +/** + * \brief Read from file a 12 bits per pixel image and uncompress it + * into a 16 bits per pixel image. + */ +bool gdcmPixelConvert::ReadAndUncompress12Bits( FILE* filePointer, + size_t uncompressedSize, + size_t PixelNumber ) +{ + SetUncompressedSize( uncompressedSize ); + AllocateUncompressed(); + + uint16_t* pdestination = (uint16_t*)Uncompressed; + + for(int p = 0; p < PixelNumber; p += 2 ) + { + // 2 pixels 12bit = [0xABCDEF] + // 2 pixels 16bit = [0x0ABD] + [0x0FCE] + uint8_t b0, b1, b2; + size_t ItemRead; + ItemRead = fread( &b0, 1, 1, filePointer); + if ( ItemRead != 1 ) + { + return false; + } + ItemRead = fread( &b1, 1, 1, filePointer); + if ( ItemRead != 1 ) + { + return false; + } + ItemRead = fread( &b2, 1, 1, filePointer); + if ( ItemRead != 1 ) + { + return false; + } + + //Two steps are necessary to please VC++ + *pdestination++ = ((b0 >> 4) << 8) + ((b0 & 0x0f) << 4) + (b1 & 0x0f); + // A B D + *pdestination++ = ((b2 & 0x0f) << 8) + ((b1 >> 4) << 4) + (b2 >> 4); + // F C E + + /// \todo JPR Troubles expected on Big-Endian processors ? + } + return true; +} + +/** + * \brief Read from file an uncompressed image. + */ +bool gdcmPixelConvert::ReadUncompressed( FILE* filePointer, + size_t uncompressedSize, + size_t expectedSize ) +{ + if ( expectedSize > uncompressedSize ) + { + dbg.Verbose(0, "gdcmPixelConvert::ReadUncompressed: expectedSize" + "is bigger than it should"); + return false; + } + SetUncompressedSize( uncompressedSize ); + AllocateUncompressed(); + size_t ItemRead = fread( (void*)Uncompressed, expectedSize, 1, filePointer); + if ( ItemRead != 1 ) + { + return false; + } + return true; +} + +/** + * \brief Convert a Gray plane and ( Lut R, Lut G, Lut B ) into an + * RGB plane. + * @return True on success. + */ +bool gdcmPixelConvert::ConvertGrayAndLutToRGB( uint8_t *lutRGBA ) + +{ + /// We assume Uncompressed contains the decompressed gray plane + /// and build the RGB image. + SetRGBSize( UncompressedSize ); + AllocateRGB(); + +//aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +//COPY HERE THE CODE OF GetImageDataIntoVector + + /// \todo check that operator new []didn't fail, and sometimes return false + return true; +} + +/** + * \brief Try to deal with RLE 16 Bits. + * We assume the RLE has allready been parsed and loaded in + * Uncompressed (through \ref ReadAndUncompressRLE8Bits ). + * We here need to make 16 Bits Pixels from Low Byte and + * High Byte 'Planes'...(for what it may mean) + * @return Boolean + */ +bool gdcmPixelConvert::UncompressRLE16BitsFromRLE8Bits( + size_t PixelNumber, + int NumberOfFrames ) + +{ + /// We assumed Uncompressed contains the decoded RLE pixels but as + /// 8 bits per pixel. In order to convert those pixels to 16 bits + /// per pixel we need to double the space. Hence we cannot work in + /// place within Uncompressed. So, here is how we handle things: + /// - First stage: copy Uncompressed in a safe place, say OldUncompressed + /// - Second stage: reallocate Uncompressed with the needed space + /// - Third stage: expand from OldUncompressed to Uncompressed + /// - Fourth stage: clean up OldUncompressed + + /// First stage: + uint8_t* OldUncompressed = new uint8_t[UncompressedSize * 2]; + memmove( OldUncompressed, Uncompressed, UncompressedSize); + + /// Second stage: + SetUncompressedSize( 2 * UncompressedSize ); + AllocateUncompressed(); + + /// Third stage: + uint8_t* x = Uncompressed; + uint8_t* a = OldUncompressed; + uint8_t* b = a + PixelNumber; + + for ( int i = 0; i < NumberOfFrames; i++ ) + { + for ( int j = 0; j < PixelNumber; j++ ) + { + *(x++) = *(a++); + *(x++) = *(b++); + } + } + + // Fourth stage: + delete[] OldUncompressed; + + /// \todo check that operator new []didn't fail, and sometimes return false + return true; +} diff --git a/src/gdcmPixelConvert.h b/src/gdcmPixelConvert.h new file mode 100644 index 00000000..f567a304 --- /dev/null +++ b/src/gdcmPixelConvert.h @@ -0,0 +1,71 @@ +/*========================================================================= + + Program: gdcm + Module: $RCSfile: gdcmPixelConvert.h,v $ + Language: C++ + Date: $Date: 2004/09/29 17:33:17 $ + Version: $Revision: 1.1 $ + + Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de + l'Image). All rights reserved. See Doc/License.txt or + http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + + +#ifndef GDCMPIXELCONVERT_H +#define GDCMPIXELCONVERTL_H + +#include "gdcmCommon.h" + +/* + * \brief Utility container for gathering the various forms the pixel data + * migth take during the user demanded processes. + */ +class GDCM_EXPORT gdcmPixelConvert { +friend class gdcmFile; + /// Pixel data represented as RGB after color interpretation + uint8_t* RGB; + size_t RGBSize; //aka ImageDataSize + /// Pixel data after decompression and bit/byte rearrangement. + uint8_t* Uncompressed; + size_t UncompressedSize; +public: + gdcmPixelConvert(); + ~gdcmPixelConvert(); + + uint8_t* GetRGB() { return RGB; } + void SetRGBSize( size_t size ) { RGBSize = size; } + size_t GetRGBSize() { return RGBSize; } + void AllocateRGB(); + + uint8_t* GetUncompressed() { return Uncompressed; } + void SetUncompressedSize( size_t size ) { UncompressedSize = size; } + size_t GetUncompressedSize() { return UncompressedSize; } + void AllocateUncompressed(); + + void Squeeze(); +////////////////////////////////////////////////////////// +// In progress +bool ReadAndUncompress12Bits( FILE* filePointer, + size_t uncompressedSize, + size_t PixelNumber ); +bool ReadUncompressed( FILE* filePointer, + size_t uncompressedSize, + size_t expectedSize ); +bool ConvertGrayAndLutToRGB( uint8_t *lutRGBA ); +bool ReadAndUncompressRLE8Bits(FILE* fp, size_t uncompressedSize ); +bool UncompressRLE16BitsFromRLE8Bits( size_t PixelNumber, int NumberOfFrames ); + + + + + +}; + +//----------------------------------------------------------------------------- +#endif diff --git a/src/gdcmPixelStuff.cxx b/src/gdcmPixelStuff.cxx deleted file mode 100644 index 85dd2cb2..00000000 --- a/src/gdcmPixelStuff.cxx +++ /dev/null @@ -1,44 +0,0 @@ -/*========================================================================= - - Program: gdcm - Module: $RCSfile: gdcmPixelStuff.cxx,v $ - Language: C++ - Date: $Date: 2004/09/27 08:39:07 $ - Version: $Revision: 1.2 $ - - Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de - l'Image). All rights reserved. See Doc/License.txt or - http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notices for more information. - -=========================================================================*/ - -#include "gdcmPixelStuff.h" - - -//----------------------------------------------------------------------------- -// Constructor / Destructor -gdcmPixelStuff::gdcmPixelStuff(void) -{ - -} - -gdcmPixelStuff::~gdcmPixelStuff() -{ - -} - - -//----------------------------------------------------------------------------- -// Public - -//----------------------------------------------------------------------------- -// Protected - -//----------------------------------------------------------------------------- -// Private - -//----------------------------------------------------------------------------- diff --git a/src/gdcmPixelStuff.h b/src/gdcmPixelStuff.h deleted file mode 100644 index ee902492..00000000 --- a/src/gdcmPixelStuff.h +++ /dev/null @@ -1,39 +0,0 @@ -/*========================================================================= - - Program: gdcm - Module: $RCSfile: gdcmPixelStuff.h,v $ - Language: C++ - Date: $Date: 2004/09/27 08:39:07 $ - Version: $Revision: 1.2 $ - - Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de - l'Image). All rights reserved. See Doc/License.txt or - http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notices for more information. - -=========================================================================*/ - - -#ifndef GDCMPIXELSTUFF_H -#define GDCMPIXELSTUFF_H - -#include "gdcmCommon.h" - -//----------------------------------------------------------------------------- -/* - * Container for Pixel related stuff - * \note This is a singleton - */ -class GDCM_EXPORT gdcmPixelStuff { -public: - gdcmPixelStuff(void); - ~gdcmPixelStuff(); - - -}; - -//----------------------------------------------------------------------------- -#endif diff --git a/src/jpeg/Makefile.am b/src/jpeg/Makefile.am deleted file mode 100644 index 578346d3..00000000 --- a/src/jpeg/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -SUBDIRS = libijg12 \ - libijg8 \ - ljpg diff --git a/src/jpeg/libijg12/Makefile.am b/src/jpeg/libijg12/Makefile.am deleted file mode 100644 index ba1b4dcf..00000000 --- a/src/jpeg/libijg12/Makefile.am +++ /dev/null @@ -1,71 +0,0 @@ -LTVERSION = 0:1:0 - -lib_LTLIBRARIES = libgdcmijpeg12.la - -##CXXFLAGS = @CXXFLAGS@ - -libgdcmijpeg12_la_SOURCES= \ - jcapimin12.c \ - jcapistd12.c \ - jctrans12.c \ - jcparam12.c \ - jdatadst12.c \ - jcinit12.c \ - jcmaster12.c \ - jcmarker12.c \ - jcmainct12.c \ - jcprepct12.c \ - jccoefct12.c \ - jccolor12.c \ - jcsample12.c \ - jchuff12.c \ - jcphuff12.c \ - jcdctmgr12.c \ - jfdctfst12.c \ - jfdctflt12.c \ - jfdctint12.c \ - jdapimin12.c \ - jdapistd12.c \ - jdtrans12.c \ - jdatasrc12.c \ - jdmaster12.c \ - jdinput12.c \ - jdmarker12.c \ - jdhuff12.c \ - jdphuff12.c \ - jdmainct12.c \ - jdcoefct12.c \ - jdpostct12.c \ - jddctmgr12.c \ - jidctfst12.c \ - jidctflt12.c \ - jidctint12.c \ - jidctred12.c \ - jdsample12.c \ - jdcolor12.c \ - jquant112.c \ - jquant212.c \ - jdmerge12.c \ - jcomapi12.c \ - jutils12.c \ - jerror12.c \ - jmemmgr12.c \ - jmemnobs12.c - -libgdcmijpeg12includedir = $(includedir) -libgdcmijpeg12include_HEADERS = \ - jchuff12.h \ - jconfig12.h \ - jdct12.h \ - jdhuff12.h \ - jerror12.h \ - jinclude12.h \ - jmemsys12.h \ - jmorecfg12.h \ - jpegint12.h \ - jpeglib12.h \ - jversion12.h - -EXTRA_DIST = \ - jconfig.linux \ - jconfig.vc diff --git a/src/jpeg/libijg8/Makefile.am b/src/jpeg/libijg8/Makefile.am deleted file mode 100644 index 55aff480..00000000 --- a/src/jpeg/libijg8/Makefile.am +++ /dev/null @@ -1,72 +0,0 @@ -LTVERSION = 0:1:0 - -lib_LTLIBRARIES = libgdcmijpeg8.la - -##CXXFLAGS = @CXXFLAGS@ - -libgdcmijpeg8_la_SOURCES= \ - jcapimin.c \ - jcapistd.c \ - jctrans.c \ - jcparam.c \ - jdatadst.c \ - jcinit.c \ - jcmaster.c \ - jcmarker.c \ - jcmainct.c \ - jcprepct.c \ - jccoefct.c \ - jccolor.c \ - jcsample.c \ - jchuff.c \ - jcphuff.c \ - jcdctmgr.c \ - jfdctfst.c \ - jfdctflt.c \ - jfdctint.c \ - jdapimin.c \ - jdapistd.c \ - jdtrans.c \ - jdatasrc.c \ - jdmaster.c \ - jdinput.c \ - jdmarker.c \ - jdhuff.c \ - jdphuff.c \ - jdmainct.c \ - jdcoefct.c \ - jdpostct.c \ - jddctmgr.c \ - jidctfst.c \ - jidctflt.c \ - jidctint.c \ - jidctred.c \ - jdsample.c \ - jdcolor.c \ - jquant1.c \ - jquant2.c \ - jdmerge.c \ - jcomapi.c \ - jutils.c \ - jerror.c \ - jmemmgr.c \ - jmemnobs.c \ - rdrle.c - -libgdcmijpeg8includedir = $(includedir) -libgdcmijpeg8include_HEADERS = \ - jchuff.h \ - jconfig.h \ - jdct.h \ - jdhuff.h \ - jerror.h \ - jinclude.h \ - jmemsys.h \ - jmorecfg.h \ - jpegint.h \ - jpeglib.h \ - jversion.h - -EXTRA_DIST = \ - jconfig.linux \ - jconfig.vc diff --git a/src/jpeg/ljpg/Makefile.am b/src/jpeg/ljpg/Makefile.am deleted file mode 100644 index cb51f570..00000000 --- a/src/jpeg/ljpg/Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ -LTVERSION = 0:1:0 - -lib_LTLIBRARIES = libgdcmjpg.la - -##CXXFLAGS = @CXXFLAGS@ - -libgdcmjpg_la_SOURCES = \ - decomp.c \ - huffd.c \ - jpegutil.c \ - mcu.c \ - predict.c \ - read.c - -libgdcmjpgincludedir = $(includedir) -libgdcmjpginclude_HEADERS = \ - io.h \ - jpeg.h \ - jpegless.h \ - mcu.h \ - predict.h \ - proto.h - diff --git a/uml.xmi b/uml.xmi deleted file mode 100644 index a85752e6..00000000 --- a/uml.xmi +++ /dev/null @@ -1,998 +0,0 @@ - - - - - umbrello uml modeller http://uml.sf.net - 1.1.5 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vtk/Makefile.am b/vtk/Makefile.am deleted file mode 100644 index ac58c96d..00000000 --- a/vtk/Makefile.am +++ /dev/null @@ -1,38 +0,0 @@ -## Process this file with automake to produce Makefile.in -LIBS_VTK=-L/usr/lib/vtk \ - -lvtkCommon -lvtkIO -lvtkFiltering -lvtkRendering -lvtkGraphics \ - -lvtkImaging -lvtkpng -lvtkzlib -lvtkjpeg -lvtkexpat -lvtktiff \ - -lvtkftgl -lvtkfreetype -LIBS_VTK_PYTHON= $(LIBS_VTK) \ - -lvtkCommonPython -lvtkIOPython -lvtkFilteringPython \ - -lvtkRenderingPython -lvtkGraphicsPython -lvtkImagingPython -INCLUDE_VTK=-I/usr/include/vtk - -LIBS_X11= -L/usr/X11R6/lib -lX11 -lXt -lSM -lICE -lXext -lGL -#LIBS_X11= $(x_ldflags) $(x_libs) - -INCLUDES = \ - -I. \ - -I$(top_srcdir)/src \ - $(PYTHON_INCLUDES) \ - $(INCLUDE_VTK) - -LDADD = \ - $(top_builddir)/src/libgdcm.la \ - $(LIBS_VTK) \ - $(LIBS_X11) - -if BUILD_VTK -noinst_PROGRAMS = vtkgdcmdemo vtkgdcmViewer #testvtkGdcmReader -vtkgdcmdemo_SOURCES = testvtkGdcmReader.cxx vtkGdcmReader.cxx -vtkgdcmViewer_SOURCES = vtkgdcmViewer.cxx vtkGdcmReader.cxx -vtkgdcmdemo_LDADD = $(LDADD) -lib_LTLIBRARIES = libvtkgdcm.la -libvtkgdcm_la_SOURCES = vtkGdcmReader.cxx -libvtkgdcm_la_LIBADD = $(LDADD) -libvtkgdcmincludedir = $(includedir) -libvtkgdcminclude_HEADERS = vtkGdcmReader.h - -else -all: -endif -- 2.45.2