+2003-07-02 Eric Boix <Eric.Boix@creatis.insa-lyon.fr>
+ * setup.py is again effective on un*x (takes into account the
+ addon of the jpeg library)
+ * Doc/DoxyDevelInstal.txt added (developper's raw documentation)
+ * Doc/Doxy* updated (includes above enhancements)
+ * INSTALL now points to web documentation
+
2003-07-01 Eric Boix <Eric.Boix@creatis.insa-lyon.fr>
* src/gdcmHeader.h doesn't make unnecessary reference to
gdcmUtil.h anymore.
--- /dev/null
+/**
+ * \page DoxyDevelInstal Developpers workspace
+ * There is no further requirements than the ones of \ref DoxyInstallation.
+ * But the developpers generally have further needs than the library user
+ * like :
+ * - in place debugging (in place as opposed to fully
+ * installed, i.e. when working in the cvs hierarchy or in the hierarchy
+ * build from gdcm source tar ball).
+ * - tests of features
+ * - test suite usage (typically after code modifications and prior to
+ * commit).
+ * .
+ * In the following we shall assume that gdcm is allready compiled-
+ * BUT not installed- in a directory named <TT>GDCM_HOME</TT>.
+ *
+ * \section DoxyDevelInstalCPlusPlus Working with C++
+ * The kernel library uses the environnement variable
+ * <TT>GDCM_DICT_PATH</TT> as a path to the location of the default
+ * Dicom dictionary. Hence if you which to work/debug a code based
+ * on gdcm, you first need to positionate this variable. When omitting
+ * this you should get the following message:
+ * <TT>gdcmDict::gdcmDict: can't open dictionary /usr/local/share/gdcm/dicomV3.dic</TT>
+ *
+ * Suppose you want to launch some C++ demo/test program, that
+ * gets compiled with the kernel, e.g. PrintHeader. One can do
+ * - <TT>cd GDCM_HOME</TT>
+ * - <TT>export GDCM_DICT_PATH=`pwd`/Dicts</TT>
+ * - <TT>cd Test</TT>
+ * - <TT>./PrintHeader</TT>
+ * .
+ * \section DoxyDevelInstalPython Working with Python
+ * - <TT>cd GDCM_HOME</TT>
+ * - <TT>./autogen.sh --enable-python</TT>
+ * - <TT>make</TT>
+ * - <TT>export PYTHONPATH=`pwd`</TT>
+ * - <TT>cd gdcmPython</TT>
+ * - <TT>ln -s .libs/pygdcm.so _gdcm.so</TT> (this is because automake
+ * doesn't allow the building of libraries whose name starts with an
+ * underscore. Since we need the wrapper library to be named _gdcm
+ * [because swig automaticatily uses this name when building the
+ * shadow classes], automake generates pygdcm.so and at install stage
+ * stage renames it to _gdcm.so).
+ * - You can then use gdcmPython for manual test/demos
+ * -# <TT>cd GDCM_HOME/gdcmPython/demo</TT>
+ * -# <TT>python PrintHeader.py</TT>
+ * .
+ * - You can also run the gdcm test suite, which is written in Python:
+ * -# first you need to install the Dicom data files used by the
+ * test suite. The cvs access point is
+ * <TT>:pserver:anonymous@cvs.creatis.insa-lyon.fr:2402/cvs/public</TT>
+ * and the name of the module is <TT>gdcmData</TT>.
+ * Checkout this module in <TT>GDCM_HOME</TT> directory
+ * -# <TT>cd GDCM_HOME/gdcmPython/</TT>
+ * -# <TT>python testSuite.py</TT>
+ * .
+ * .
+ */
* .
* .
*
- * \section DoxyInstallLinux Linux
+ * \section DoxyInstallLinux Un*x
* \subsection DoxyInstallLinuxCvs Starting from cvs sources.
- * - Retrieve the sources through cvs
+ * - Retrieve the
+ <A HREF="http://www.creatis.insa-lyon.fr/Public/Gdcm/cvs.html">
+ sources through cvs</A>,
* - <TT>cd gdcm</TT>
* - <TT>./autogen.sh --help</TT> in order to select your preferences
* - <TT>./autogen.sh</TT> to launch the usual automake/autoconf
* process e.g.
* -# <TT>./autogen.sh --prefix=/where/ever/you/want</TT>
- * to configure the script to force installation in a specified
- * place.
+ * to configure the script to force installation in a specified
+ * place.
* -# <TT>./autogen.sh --enable-python</TT> to generate the
- * python wrappers.
+ * python wrappers (a.k.a. gdcmPython)
+ * -# <TT>./autogen.sh --enable-vtk</TT> to generate the
+ * vtk clases that shallow wrap gdcm,
+ * -# <TT>./autogen.sh --enable-doxygen</TT> to generate the
+ * <A HREF="http://www.doxygen.org/">doxygen</A>
+ * based documentation
* .
* - <TT>make</TT> (or <TT>make 'CFLAGS=-g</TT>...)
* - <TT>make instal</TT>
* - \ref DoxyIntroduction
* - \ref DoxyInstallation
* - \ref DoxyPythonComplete
+ * - \ref DoxyDevelInstal
* - <A HREF="namespace.html">Namespace List</A>
* - <A HREF="hierarchy.html">Class Hierarchy</A>
* - <A HREF="classes.html">Alphabetical List</A>
# with spaces.
INPUT = ../src DoxyPython.txt DoxyMainPage.txt \
- DoxyInstallation.txt DoxyPython.txt DoxyIntroduction.txt
+ DoxyInstallation.txt DoxyDevelInstal.txt \
+ DoxyPython.txt DoxyIntroduction.txt
# If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-* For compiling the library and C++ test programs:
-
-./autogen.sh
-./configure (optional if just after autogen.sh)
-make
-make instal
-
-You can use the --prefix option of the configure script to force installation
-in some place (default is /usr/local/DCMlib):
-
-./configure --prefix=/where/ever/you/want
-
-
-* For testing in C++:
-./Test/test ../Data/CR-MONO1-10-chest.dcm (or any other file in there)
-
-
-* For testing in Python:
-cd python/gdcmPython
-make (requires SWIG Version 1.3.16u i.e. the contemporary devel version)
-python testSuite.py (test suite written in unittest, you should use python2)
-
-
-* For manual test in python:
-cd python/demo
-python test.py ../../Data/CR-MONO1-10-chest.dcm (or any other file)
-
-
------------------------------------------------------------------------------
-Documentation can be found in the Doc sub-directory. Please refer to
+###################################################
+For the impatient:
+ * cvs -d:pserver:anonymous@cvs.creatis.insa-lyon.fr:2402/cvs/public login
+ answer anonymous
+ * cvs -d:pserver:anonymous@cvs.creatis.insa-lyon.fr:2402/cvs/public co gdcm
+ * cd gdcm
+ * ./autogen.sh (--enable-python --enable-vtk --enable-doc)
+ * make
+ * make instal
+
+###################################################
+The full documentation for installation is available at
+ http://www.creatis.insa-lyon.fr/Public/Gdcm/html.developper/DoxyInstallation.html
+
+###################################################
+The documentation can also be found in the Doc sub-directory. Please refer to
README file within Doc.
ThisModule='gdcmPython'
gdcmPythonSrcDir=ThisModule
gdcmSrcDir ="src"
+gdcmJpeg8SrcDir =os.path.join('src', 'jpeg', 'libijg8')
gdcmvtkSrcDir ="vtk"
gdcmDictsDir ="Dicts"
gdcmTestDir ="Test"
targetDir=os.path.join(targetDir, ThisModule)
-# For the Swig compilation
+### Sources section: determination of sources for the extensions:
+# Sources 1a/ The kernel of gdcm itself (which wrapped with Swig)
+# defines the first extension
Sources = []
Sources.extend(glob.glob(os.path.join(gdcmSrcDir,"*.cxx")))
-#Sources.extend(glob.glob(os.path.join(gdcmSrcDir,"*.h")))
Sources.append(os.path.join(gdcmPythonSrcDir,"gdcm.i"))
+# Sources 1b/ The kernel of gdcm depends on a jpeg library whose sources are
+# contained in subdir gdcmJpeg8SrcDir. But within this subdir
+# some of the C files should not be compiled (refer to
+# gdcmJpeg8SrcDir/Makefile.am) !
+Jpeg8Sources = glob.glob(os.path.join(gdcmJpeg8SrcDir,"j*.c"))
+Jpeg8SourcesToRemove = ['jmemansi.c', 'jmemname.c', 'jmemdos.c', 'jmemmac.c']
+for Remove in Jpeg8SourcesToRemove:
+ ### Because setup.py is a multiple pass process we need to trap
+ ### the case were the files were allready wed out on a previous pass.
+ try:
+ Jpeg8Sources.remove(os.path.join(gdcmJpeg8SrcDir, Remove))
+ except ValueError:
+ continue
+Sources.extend(Jpeg8Sources)
-# For the VTK compilation
+# Sources 2/ The second extension contains the VTK classes (which we wrap
+# with the vtk wrappers):
VTK_INCLUDE_DIR=os.path.join(VTK_PATH,"include","vtk")
VTK_LIB_DIR=os.path.join(VTK_PATH,"lib","vtk")
-
vtkSources = []
vtkSources.extend(glob.glob(os.path.join(gdcmvtkSrcDir,"vtk*.cxx")))
vtkSources.extend(glob.glob(os.path.join(gdcmSrcDir,"*.cxx")))
-#vtkSources.extend(glob.glob(os.path.join(gdcmvtkSrcDir,"vtk*.h")))
-
vtkLibraries=["vtkCommon","vtkCommonPython",
"vtkIO","vtkIOPython",
"vtkFiltering","vtkFilteringPython"]
+#####
setup(name=ThisModule,
version="0.2",
description="...",