]> Creatis software - gdcm.git/commitdiff
upgrades for 4DSplitter
authorjpr <jpr>
Tue, 29 Mar 2011 07:35:55 +0000 (07:35 +0000)
committerjpr <jpr>
Tue, 29 Mar 2011 07:35:55 +0000 (07:35 +0000)
17 files changed:
CMakeLists.txt
Example/CMakeLists.txt
Example/MergeDICOMRaw.cxx
Example/PcpdenseToDicom.cxx
Example/SplitIntoXCoherentDirectories.cxx
Example/SplitIntoXCoherentDirectoriesIgnoreSerieUID.cxx
Example/ToMRIregister.cxx
src/gdcmDataEntry.cxx
src/gdcmDataEntry.h
src/gdcmDocument.cxx
src/gdcmSerieHelper.cxx
src/gdcmSerieHelper.h
vtk/CMakeLists.txt
vtk/vtkGdcmReader.cxx
vtk/vtkGdcmReader.h
vtk/vtkgdcmViewer.cxx
vtk/vtkgdcmViewer2.cxx

index 2d385c98258488dc01f78d8170a3b5c7510e3d9f..130073046e856d8648e31f97e98bf20131d07ad1 100644 (file)
@@ -1,3 +1,12 @@
+# ---------------------------------
+#
+# Unless you are an experimented cmake user,
+# have a look at :
+# http://www.creatis.insa-lyon.fr/site/fr/CreatoolsGettingStarted-v2.0.X
+# before starting.
+#
+# ---------------------------------
+
 PROJECT(GDCM)
 CMAKE_MINIMUM_REQUIRED(VERSION 2.0)
 # okay in fact you need at least cmake 2.0.4 to get swig working properly
index 3b7c5ca8a36a0df5e64716c99c12828e430c6410..3962d22461d1d7a08ad125917616bce4f7cd1070 100644 (file)
@@ -5,7 +5,7 @@ INCLUDE_DIRECTORIES(
   ${GDCM_BINARY_DIR}/src)
 SET(EXAMPLE_SOURCES
   #names starting with 'ex' are examples
-  #------------------------------------- 
+  #-------------------------------------
   #SingleFrames2Multiframe
   #Txt2Mat  
   #exDicomRTStructSetFile  
index b44e490e0f752bec3f0bccbb92b6ecaa4a1cd111..4fb43c71e2f80e196511cb2407448cff291023ce 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: MergeDICOMRaw.cxx,v $
   Language:  C++
-  Date:      $Date: 2010/09/01 14:41:48 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2011/03/29 07:35:57 $
+  Version:   $Revision: 1.4 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -137,7 +137,7 @@ int main(int argc, char *argv[])
 
   // TODO
   // for UltrasoundMultiframeImageStorage we may need also:
-  // (0028,0009) AT (0018,1063)                              #   4, 1 FrameIncrementPointer
+  // (0028,0009) AT (0018,1063)  #   4, 1 FrameIncrementPointer
   // and
   // Pixel Aspect Ratio
 
index 161d94526022e9cb25adab92cf08b642a2190948..a31c050bc51e6a34a3b91da865010e5bf60f9832 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: PcpdenseToDicom.cxx,v $
   Language:  C++
-  Date:      $Date: 2010/09/01 14:41:48 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2011/03/29 07:35:57 $
+  Version:   $Revision: 1.7 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -154,9 +154,9 @@ int main(int argc, char *argv[])
    // === Ecc ===
    
    strSerieUID =  GDCM_NAME_SPACE::Util::CreateUniqueUID();
-   
+
    serieDescr = "Ecc";
-   
+
    if (!multiframe) {
              
      for (int i=0; i<numberOfSlices; i++)
@@ -219,9 +219,8 @@ int main(int argc, char *argv[])
 // === perf ===
 
    strSerieUID =  GDCM_NAME_SPACE::Util::CreateUniqueUID();
-   
+
    serieDescr = "perf";
-   
    if (!multiframe) {    
      for (int i=0; i<numberOfSlices; i++)
      {      
@@ -282,8 +281,8 @@ int main(int argc, char *argv[])
 
 
    strSerieUID =  GDCM_NAME_SPACE::Util::CreateUniqueUID();
-   
-   serieDescr = "WashoutTc";   
+
+   serieDescr = "WashoutTc";
    
    if (multiframe) {    
      for (int i=0; i<numberOfSlices; i++)
index 6e83fd58b61bb39891213464d89402e7843192a8..32829478b1c3734edd9035bd883f429fddcb88e8 100755 (executable)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: SplitIntoXCoherentDirectories.cxx,v $
   Language:  C++
-  Date:      $Date: 2009/05/28 15:44:34 $
-  Version:   $Revision: 1.4 $
+  Date:      $Date: 2011/03/29 07:35:58 $
+  Version:   $Revision: 1.5 $
  
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -50,7 +50,7 @@ int main(int argc, char *argv[])
    "       tag : group-elem    (in hexa, no space)                            ",
    "                       the user wants to split on                         ",
    "       sort :  user wants FileHelper to sort the images                   ",
-   "               Warning : will probabely crah if sort has no meaning       ",
+   "               Warning : will probabely crash if sort has no meaning      ",
    "                (not only look at image names)                            ",
    "       studyUID   : *aware* user wants to add the serie                   ",
    "                                             to an already existing study ",
@@ -149,13 +149,12 @@ int main(int argc, char *argv[])
 
    s->SetLoadMode(GDCM_NAME_SPACE::LD_ALL); // Load everything for each File
    s->SetDirectory(dirName, true);          // true : recursive exploration
-
-   GDCM_NAME_SPACE::File *f;
    
    GDCM_NAME_SPACE::DirList dirlist(dirName, true); // recursive exploration
    GDCM_NAME_SPACE::DirListType fileNames = dirlist.GetFilenames();
-
    GDCM_NAME_SPACE::FileList *l = new GDCM_NAME_SPACE::FileList;
+
+   GDCM_NAME_SPACE::File *f;
 // Loop on all the gdcm-readable files
    for (GDCM_NAME_SPACE::DirListType::iterator it = fileNames.begin();
                                     it != fileNames.end();
index bec07d82fc046fbf6fa44669c253048726067d6e..992b53c0c3158967f88a83afd859e2c260f4cadd 100755 (executable)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: SplitIntoXCoherentDirectoriesIgnoreSerieUID.cxx,v $
   Language:  C++
-  Date:      $Date: 2009/05/28 15:44:34 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2011/03/29 07:35:58 $
+  Version:   $Revision: 1.3 $
  
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -48,7 +48,7 @@ int main(int argc, char *argv[])
    "       tag : group-elem    (in hexa, no space)                            ",
    "                       the user wants to split on                         ",
    "       sort :  user wants FileHelper to sort the images                   ",
-   "               Warning : will probabely crah if sort has no meaning       ",
+   "               Warning : will probabely crash if sort has no meaning      ",
    "                (not only look at image names)                            ",
    "       studyUID   : *aware* user wants to add the serie                   ",
    "                                             to an already existing study ",
index ae426b59fa648dae2725803c65bf8f6748268724..7ebc8f002e6fe78cfd61e41600a94a99043a1083 100755 (executable)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: ToMRIregister.cxx,v $
   Language:  C++
-  Date:      $Date: 2007/10/24 08:03:44 $
-  Version:   $Revision: 1.5 $
+  Date:      $Date: 2011/03/29 07:35:58 $
+  Version:   $Revision: 1.6 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -41,7 +41,7 @@ int main(int argc, char *argv[])
    "\n ToMriregister :\n                                                      ",
    " - Converts the Siemens Sonata MRI '*tfl2d1'                              ",
    " to be processable by MriRegister software                                ",
-   " - May be used as a template for GDCM_NAME_SPACE::SerieHelper use.                   ",
+   " - May be used as a template for GDCM_NAME_SPACE::SerieHelper use.        ",
    "                                                                          ",
    "usage: ToMriRegister dirin=inputDirectoryName                             ",
    "                     dirout=outputDirectoryName                           ",
index 07603e1b35b44df1b21cbf1ee27db0b15b81fbb9..78f186c59b3f9f45ac7c13143ba78e09a5917367 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDataEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2010/07/09 09:20:20 $
-  Version:   $Revision: 1.56 $
+  Date:      $Date: 2011/03/29 07:36:00 $
+  Version:   $Revision: 1.57 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -168,7 +168,7 @@ bool DataEntry::IsNumerical()
     {
        /// \todo rewrite the whole method, in order *not to use* std::string !
        std::vector<std::string> tokens;
-    
+
        Util::Tokenize ( GetString().c_str(), tokens, "\\" );
 
        int nbValues= tokens.size();
@@ -181,14 +181,14 @@ bool DataEntry::IsNumerical()
        else
           for (loop=0; loop<nbValues; loop++) 
              valueVector.push_back(atoi(tokens[loop].c_str()));
-      
+
        return true;     
     }    
 
     uint32_t nbValues = GetValueCount();
     if (nbValues == 0)
        return false;
-  
+
     if( vr == "US") {
        for (loop=0; loop<nbValues; loop++)
              valueVector.push_back(((uint16_t *)BinArea)[loop]);  
index 891f7d5cc3b912e9a0b5a91b87c45166e814b6c1..a4f25424ffcc6d3dc01c7d3be332a1dc3d5b64ea 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDataEntry.h,v $
   Language:  C++
-  Date:      $Date: 2009/02/05 09:50:09 $
-  Version:   $Revision: 1.22 $
+  Date:      $Date: 2011/03/29 07:36:00 $
+  Version:   $Revision: 1.23 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -16,7 +16,7 @@
                                                                                 
 =========================================================================*/
  
-#ifndef G_DCMDATAENTRY_H_
+#ifndef _GDCMDATAENTRY_H_
 #define _GDCMDATAENTRY_H_
 
 #include "gdcmDocEntry.h"
index f9bb7c709a99518e030f7f37fc9532f04ff76463..284fe5e6fee561ab73a129a052ac542318acbb84 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.cxx,v $
   Language:  C++
-  Date:      $Date: 2010/07/09 09:20:21 $
-  Version:   $Revision: 1.385 $
+  Date:      $Date: 2011/03/29 07:36:00 $
+  Version:   $Revision: 1.386 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -1129,7 +1129,6 @@ void Document::ParseDES(DocEntrySet *set, long offset,
       std::cout << std::dec <<"(long)(Fp->tellg()) " << (long)(Fp->tellg()) // in Debug mode
                 << std::hex << " 0x(" <<(long)(Fp->tellg()) <<  ")" << std::endl;
 
-
    // if ( !delim_mode && ((long)(Fp->tellg())-offset) >= l_max) // Once per DocEntry   
       if ( !delim_mode ) // 'and then' doesn't exist in C++ :-(
          if ( ((long)(Fp->tellg())-offset) >= l_max) // Once per DocEntry, when no delim mode
index 4e215e7fb221ca8a96a9c2f8e02b3cb4b9224791..56aaaabcb1533c75bd01f38caa9016193a715dd0 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSerieHelper.cxx,v $
   Language:  C++
-  Date:      $Date: 2010/04/09 15:38:18 $
-  Version:   $Revision: 1.70 $
+  Date:      $Date: 2011/03/29 07:36:00 $
+  Version:   $Revision: 1.71 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -13,7 +13,7 @@
      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 "gdcmSerieHelper.h"
@@ -581,14 +581,14 @@ XCoherentFileSetmap SerieHelper::SplitOnPosition(FileList *fileSet)
  * \return  std::map of 'Xcoherent' File sets
  */
 
-XCoherentFileSetmap SerieHelper::SplitOnTagValue(FileList *fileSet, 
+XCoherentFileSetmap SerieHelper::SplitOnTagValue(FileList *fileSet,
                                                uint16_t group, uint16_t element)
 {
    XCoherentFileSetmap CoherentFileSet;
 
    int nb = fileSet->size();
    if (nb == 0 ) {
-      gdcmWarningMacro("Empty FileList passed to SplitOnPosition");
+      gdcmWarningMacro("Empty FileList passed to SplitOnTagValue");
       return CoherentFileSet;
    }
 
@@ -605,6 +605,60 @@ XCoherentFileSetmap SerieHelper::SplitOnTagValue(FileList *fileSet,
       // 0020,0030 : Image Position (RET)
 
       strTagValue = (*it)->GetEntryString(group,element);
+
+      if ( CoherentFileSet.count(strTagValue) == 0 )
+      {
+         gdcmDebugMacro("  :[" << strTagValue << "]");
+         // create a File set in 'position' position
+         CoherentFileSet[strTagValue] = new FileList;
+      }
+      // Current Tag value and DICOM header match; add the file:
+      CoherentFileSet[strTagValue]->push_back( (*it) );
+   }
+   return CoherentFileSet;
+}
+
+
+/**
+ * \brief   Splits a 'Single SerieUID' File set Coherent according to the
+ *          value of a given Tag
+ * @param fileSet File Set to be splitted
+ * @param   group  group number of the target Element
+ * @param   element element number of the target Element
+ * \return  std::map of 'Xcoherent' File sets
+ */
+
+XCoherentFileSetmap SerieHelper::SplitOnTagValueConvertToFloat(FileList *fileSet,
+                                               uint16_t group, uint16_t element)
+{
+   XCoherentFileSetmap CoherentFileSet;
+
+   int nb = fileSet->size();
+   if (nb == 0 ) {
+      gdcmWarningMacro("Empty FileList passed to SplitOnTagValue");
+      return CoherentFileSet;
+   }
+
+   std::string strTagValue;  // read on disc
+
+   double      dTagValue;
+   int         iTagValue;
+   char        cTagValue[11];
+   std::string sTagValue;
+
+   FileList::const_iterator it = fileSet->begin();
+   //it ++;
+   for ( ;
+         it != fileSet->end();
+       ++it)
+   {
+      /// \TODO : find a trick to create a string whose value follows lexicographical order 
+
+      strTagValue = (*it)->GetEntryString(group,element);
+      dTagValue = atof( strTagValue.c_str());
+      iTagValue = dTagValue;
+      sprintf(cTagValue, "%010d", iTagValue);
+      strTagValue = cTagValue;
       
       if ( CoherentFileSet.count(strTagValue) == 0 )
       {
index c7405f4ec2f6f0a664e4a425efca501893cb1fea..2f20fe4f2911a43fcedcbef98ae1daf1d4dc9636 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSerieHelper.h,v $
   Language:  C++
-  Date:      $Date: 2010/04/09 15:38:18 $
-  Version:   $Revision: 1.46 $
+  Date:      $Date: 2011/03/29 07:36:00 $
+  Version:   $Revision: 1.47 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -91,6 +91,11 @@ public:
    void OrderFileList(FileList *fileSet);
    void Clear() { ClearAll(); }
 
+   bool UserOrdering(FileList *fileSet);
+   bool ImagePositionPatientOrdering(FileList *fileSet);
+   bool ImageNumberOrdering(FileList *fileSet);
+   bool FileNameOrdering(FileList *fileSet);
+
    /// \brief Gets the FIRST Single SerieUID Fileset.
    ///        Deprecated; kept not to break the API
    /// \note Caller must call OrderFileList first
@@ -187,16 +192,21 @@ public:
    XCoherentFileSetmap SplitOnPosition(FileList *fileSet); 
    XCoherentFileSetmap SplitOnTagValue(FileList *fileSet,
                                                uint16_t group, uint16_t element);
+   XCoherentFileSetmap SplitOnTagValueConvertToFloat(FileList *fileSet,
+                                               uint16_t group, uint16_t element);
 protected :
    SerieHelper();
    
 private:
    void ClearAll();
+
+   /*
+   //move them to public (usefull for aware user!)
    bool UserOrdering(FileList *fileSet);
    bool ImagePositionPatientOrdering(FileList *fileSet);
    bool ImageNumberOrdering(FileList *fileSet);
    bool FileNameOrdering(FileList *fileSet);
-   
+  */
    static bool ImageNumberLessThan(File *file1, File *file2);
    static bool ImageNumberGreaterThan(File *file1, File *file2);
    static bool FileNameLessThan(File *file1, File *file2);
index fd422a85782ab385eb6c5a8c1a49191bf72caa56..9d6b47323bf0f09ccaceeae7dd28bc1a42f80e57 100644 (file)
@@ -29,6 +29,7 @@ IF("${VTK_MAJOR_VERSION}" GREATER 4)
     vtkGdcmWriter.cxx
     vtkImageColorViewer.cxx
     vtkImageMapToWindowLevelColors2.cxx
+    # vtkGdcm4DSplitter.cxx
   )
 ELSE("${VTK_MAJOR_VERSION}" GREATER 4)
   SET(VTKGDCM_LIB_SRCS
@@ -67,11 +68,11 @@ TARGET_LINK_LIBRARIES(vtkgdcmdemo
 SET(Bmp2Dcm_SOURCES
   Bmp2Dcm.cxx
 )
+
 ADD_EXECUTABLE(Bmp2Dcm ${Bmp2Dcm_SOURCES})
 TARGET_LINK_LIBRARIES(Bmp2Dcm
   vtkgdcm
   vtkImaging
-
 )
 
 #-----------------------------------------------------------------------------
@@ -136,7 +137,6 @@ TARGET_LINK_LIBRARIES(vtkgdcmSerieViewer2
   vtkRendering
 )
 
-
 #-----------------------------------------------------------------------------
 SET(vtkWriteDicom_SOURCES
   vtkWriteDicom.cxx
@@ -170,10 +170,10 @@ IF(NOT GDCM_INSTALL_NO_LIBRARIES)
   INSTALL_TARGETS(${GDCM_INSTALL_LIB_DIR} vtkgdcm)
   INSTALL_TARGETS(${GDCM_INSTALL_BIN_DIR} vtkgdcmViewer)
   INSTALL_TARGETS(${GDCM_INSTALL_BIN_DIR} vtkgdcmViewer)
-  
+
  # INSTALL_TARGETS(${GDCM_INSTALL_BIN_DIR} vtkJPEGViewer)
  # INSTALL_TARGETS(${GDCM_INSTALL_BIN_DIR} vtkJPEGViewer2)
-      
+
   INSTALL_TARGETS(${GDCM_INSTALL_BIN_DIR} vtkgdcmSerieViewer)
 ENDIF(NOT GDCM_INSTALL_NO_LIBRARIES)
 
index 913f9a7417c29c0110f6a39ca8e119f30d5cd71e..449eb536c67cb39824416ad4ac0e204ea8d8f6e0 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: vtkGdcmReader.cxx,v $
   Language:  C++
-  Date:      $Date: 2010/09/01 13:33:36 $
-  Version:   $Revision: 1.98 $
+  Date:      $Date: 2011/03/29 07:36:02 $
+  Version:   $Revision: 1.99 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -92,7 +92,7 @@
 #include <vtkPointData.h>
 #include <vtkLookupTable.h>
 
-vtkCxxRevisionMacro(vtkGdcmReader, "$Revision: 1.98 $")
+vtkCxxRevisionMacro(vtkGdcmReader, "$Revision: 1.99 $")
 vtkStandardNewMacro(vtkGdcmReader)
 
 //-----------------------------------------------------------------------------
@@ -861,7 +861,7 @@ void vtkGdcmReader::LoadImageInMemory(
          src  = (unsigned char*)fileH->GetImageData();
       //else
       // very strange, but it doesn't work (I have to memcpy the pixels ?!?)
-      //   dest  = (unsigned char*)fileH->GetImageData();  
+      //   dest  = (unsigned char*)fileH->GetImageData();
    }
 
 if (this->GetFlipY()) {
index 183fbf0154a219c72eaffbd27b2ea582fe27a395..dc29361fed76782e4647e6b2f7777e3bbf35d69f 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: vtkGdcmReader.h,v $
   Language:  C++
-  Date:      $Date: 2010/09/01 13:33:36 $
-  Version:   $Revision: 1.38 $
+  Date:      $Date: 2011/03/29 07:36:02 $
+  Version:   $Revision: 1.39 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -73,17 +73,17 @@ public:
    vtkSetMacro(KeepOverlays, bool);
    vtkGetMacro(KeepOverlays, bool);
    vtkBooleanMacro(KeepOverlays, bool);
+
 //  Implementation note: when FileLowerLeft (gdcm2) is set to on the image is not flipped
 // upside down as VTK would expect, use this option only if you know what you are doing.   
   // vtkSetMacro(FileLowerLeft, bool);
   // vtkGetMacro(FileLowerLeft, bool);
   // vtkBooleanMacro(FileLowerLeft, bool);
-     
+
   vtkSetMacro(FlipY, bool);
   vtkGetMacro(FlipY, bool);
   vtkBooleanMacro(FlipY, bool);
-     
+
    vtkGetObjectMacro(LookupTable, vtkLookupTable);
 
 // FIXME : HOW to doxygen a VTK macro?
@@ -199,6 +199,7 @@ private:
    
   // bool FileLowerLeft;
    bool FlipY;
+
    /// Pointer to a user suplied function to allow modification of pixel order
    VOID_FUNCTION_PUINT8_PFILE_POINTER UserFunction;
 
index 95da0fa0faf98538d2882e3246124ffd01376156..6d2751a6b90218f8c82512260cd4200061371780 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: vtkgdcmViewer.cxx,v $
   Language:  C++
-  Date:      $Date: 2009/11/03 14:05:23 $
-  Version:   $Revision: 1.32 $
+  Date:      $Date: 2011/03/29 07:36:02 $
+  Version:   $Revision: 1.33 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -156,7 +156,6 @@ reader->GetOutput()->GetScalarComponentAsFloat(0,127,0,0) <<
    iren->Start();
 
    //if you wish you can export dicom to a vtk file
    vtkStructuredPointsWriter *writer = vtkStructuredPointsWriter::New();
    writer->SetInput( reader->GetOutput());
    writer->SetFileName( "foo.vtk" );
index caf0b83661708feceb7ca08d7fff457bcdfa8b57..f991efdedd4bb8036c7654994c309f5e84e2f885 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: vtkgdcmViewer2.cxx,v $
   Language:  C++
-  Date:      $Date: 2010/09/01 13:33:36 $
-  Version:   $Revision: 1.18 $
+  Date:      $Date: 2011/03/29 07:36:02 $
+  Version:   $Revision: 1.19 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -120,7 +120,7 @@ int main(int argc, char *argv[])
 {
    if( argc < 2 )
       return 0;
-      
+
    bool metaWrite = false;
   
    vtkGdcmReader *reader = vtkGdcmReader::New();
@@ -132,7 +132,7 @@ int main(int argc, char *argv[])
       argc--; // Is it allowed?!?
       reader->SetKeepOverlays(true);
    }
+
 // not a very clever way to pass several params
 // but it's just for checking
    if (strcmp (argv[argc-1], "n") == 0)
@@ -146,7 +146,7 @@ int main(int argc, char *argv[])
       argc--; // Is it allowed?!?
       metaWrite = true;
    }
-   
+
    if( argc == 2 )
       reader->SetFileName( argv[1] );
    else
@@ -174,8 +174,7 @@ int main(int argc, char *argv[])
       //w->Delete();
       std::cout << "end write .mhd" << std::endl;
     //}
-    
-    
+
    vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
 #if VTK_MAJOR_VERSION >= 5
    vtkImageColorViewer *viewer = vtkImageColorViewer::New();
@@ -229,7 +228,7 @@ int main(int argc, char *argv[])
    writer->SetFileName( "foo.vtk" );
    writer->SetFileTypeToBinary();
    //writer->Write();
-   
+
    //if you wish you can export dicom to a .mhd file
    /*
    if (metaWrite) {