]> Creatis software - gdcm.git/commitdiff
* setup.py is again effective on un*x (takes into account the
authorfrog <frog>
Wed, 2 Jul 2003 13:21:36 +0000 (13:21 +0000)
committerfrog <frog>
Wed, 2 Jul 2003 13:21:36 +0000 (13:21 +0000)
        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  --- Frog

ChangeLog
Doc/DoxyDevelInstal.txt [new file with mode: 0644]
Doc/DoxyInstallation.txt
Doc/DoxyMainPage.txt
Doc/DoxyfileDeveloppers
INSTALL
setup.py

index e9a71ba2269cbc58a332d3ea8c55253876417e91..5c0a2a281aa433cfa18bad742aebe82170c456c5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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.
diff --git a/Doc/DoxyDevelInstal.txt b/Doc/DoxyDevelInstal.txt
new file mode 100644 (file)
index 0000000..126c9d1
--- /dev/null
@@ -0,0 +1,57 @@
+/**
+ * \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>
+ *        .
+ *     .
+ */
index 3ba3bacac64ba34295c4642088d9e9ca8acc2c90..c1c107fc5760f6c49d77942720a79b1252ebc21d 100644 (file)
  *     .
  *  .
  * 
- * \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>
index 096b8118725882a4a667eaa012bf0d1d065cc4eb..3e11aba254b68954cd5b228c647ee34fad02ed24 100644 (file)
@@ -4,6 +4,7 @@
  * - \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>
index 7f960e046d42dbeeede49a578f7dc723ccf1e073..ff736cb4cc959c2e81ad017c6e8fefc606aba260 100644 (file)
@@ -302,7 +302,8 @@ WARN_LOGFILE           =
 # 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 
diff --git a/INSTALL b/INSTALL
index ecae1fa749fe4f7a8c5f34fb378b61847d7d2ad3..123306df070f31231786a5e703c337905989a2ee 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -1,31 +1,17 @@
-* 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.
index 7697a86dd576dd3484e8875642b2df455276cb7a..3d7040f065432875561b14240f92c065d06c2859 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -7,6 +7,7 @@ from WrapVTK import *
 ThisModule='gdcmPython'
 gdcmPythonSrcDir=ThisModule
 gdcmSrcDir      ="src"
+gdcmJpeg8SrcDir  =os.path.join('src', 'jpeg', 'libijg8')
 gdcmvtkSrcDir   ="vtk"
 gdcmDictsDir    ="Dicts"
 gdcmTestDir     ="Test"
@@ -36,25 +37,39 @@ else:
 
 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="...",