]> Creatis software - gdcm.git/commitdiff
* vtk/vtkGdcmReader.cxx : bug fix when loading only 1 file.
authorregrain <regrain>
Mon, 7 Jul 2003 10:26:14 +0000 (10:26 +0000)
committerregrain <regrain>
Mon, 7 Jul 2003 10:26:14 +0000 (10:26 +0000)
      * src/gdcmHeader.h : formatting code
      -- BeNours

ChangeLog
src/gdcmHeader.h
vtk/vtkGdcmReader.cxx

index 246081bcf40c7027c50756128b54af2bc09d67eb..bbcb6daac34f2e4bb072443dbe2683dbc4e3b3e4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2003-07-07  Benoit Regrain <Benoit.Regrain@creatis.insa-lyon.fr>
+      * vtk/vtkGdcmReader.cxx : bug fix when loading only 1 file.
+      * src/gdcmHeader.h : formatting code
+
 2003-07-07  Benoit Regrain <Benoit.Regrain@creatis.insa-lyon.fr>
       * vtk/vtkGdcmReader.[cxx|h] : bug fix when loading only one file.
         We were obtaining error message from vtk. Now, creation of file list
index 8d6d4b783e6b975de8d25ea5eeab15921d11886d..33abf811398f7ed07c4417bf5c358d81488c226d 100644 (file)
@@ -1,4 +1,4 @@
-// $Header: /cvs/public/gdcm/src/Attic/gdcmHeader.h,v 1.33 2003/07/04 17:12:42 regrain Exp $
+// $Header: /cvs/public/gdcm/src/Attic/gdcmHeader.h,v 1.34 2003/07/07 10:26:14 regrain Exp $
 
 #ifndef GDCMHEADER_H
 #define GDCMHEADER_H
@@ -134,7 +134,7 @@ public:
    gdcmHeader( bool exception_on_error = false);
    virtual ~gdcmHeader();
 
-       std::string GetFileName(void) {return filename;}
+   std::string GetFileName(void) {return filename;}
    
    size_t GetPixelOffset(void);
    int    GetSwapCode(void) { return sw; }
index 02f05672b4f7c49687c54acba1ff250152386a69..8d521ff058813cd3bff82aa39dc2cec69f81e2ee 100644 (file)
@@ -1,4 +1,4 @@
-// $Header: /cvs/public/gdcm/vtk/vtkGdcmReader.cxx,v 1.15 2003/07/07 09:10:33 regrain Exp $
+// $Header: /cvs/public/gdcm/vtk/vtkGdcmReader.cxx,v 1.16 2003/07/07 10:26:14 regrain Exp $
 #include <stdio.h>
 #include <vtkObjectFactory.h>
 #include <vtkImageData.h>
@@ -97,7 +97,7 @@ void vtkGdcmReader::BuildFileListFromPattern()
      return;
      }
 
-       this->RemoveAllInternalFileName();
+   this->RemoveAllInternalFileName();
    for (int idx = this->DataExtent[4]; idx <= this->DataExtent[5]; ++idx)
      {
      this->ComputeInternalFileName(idx);
@@ -440,9 +440,9 @@ void vtkGdcmReader::ExecuteData(vtkDataObject *output)
 
   // Test if output has valid extent
   // Prevent memory errors
-  if((this->DataExtent[1]-this->DataExtent[0]>0) &&
-     (this->DataExtent[3]-this->DataExtent[2]>0) &&
-     (this->DataExtent[5]-this->DataExtent[4]>0))
+  if((this->DataExtent[1]-this->DataExtent[0]>=0) &&
+     (this->DataExtent[3]-this->DataExtent[2]>=0) &&
+     (this->DataExtent[5]-this->DataExtent[4]>=0))
     {
     // The memory size for a full stack of images of course depends
     // on the number of planes and the size of each image:
@@ -491,7 +491,6 @@ void vtkGdcmReader::ExecuteData(vtkDataObject *output)
             }
                      }
         } // Else, file not loadable
-
       } // Loop on files
 
     // The "size" of the vtkScalars data is expressed in number of points,