]> Creatis software - gdcm.git/blobdiff - vtk/vtkGdcmReader.cxx
COMP: applying another patch send to jasper group, to please bcc32 5.5.1
[gdcm.git] / vtk / vtkGdcmReader.cxx
index db2e605d7a2938250a3fb881c0094a0f5edc2abf..cad97d6873565ba9e835a8b765f3b2ed0ff2d7bc 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: vtkGdcmReader.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/04/28 09:29:05 $
-  Version:   $Revision: 1.69 $
+  Date:      $Date: 2005/06/06 08:38:29 $
+  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
@@ -83,7 +83,7 @@
 #include <vtkPointData.h>
 #include <vtkLookupTable.h>
 
-vtkCxxRevisionMacro(vtkGdcmReader, "$Revision: 1.69 $");
+vtkCxxRevisionMacro(vtkGdcmReader, "$Revision: 1.71 $");
 vtkStandardNewMacro(vtkGdcmReader);
 
 //-----------------------------------------------------------------------------
@@ -491,7 +491,10 @@ int vtkGdcmReader::CheckFileCoherence()
       //gdcm::File GdcmFile( filename->c_str() );
       // to save some parsing time.
       gdcm::File GdcmFile;
-      GdcmFile.SetLoadMode( NO_SEQ | NO_SHADOW );
+      // Some images have a wrong length for 0x0000 element of private groups
+      // Better we don't use NO_SHADOW as a default option
+      //GdcmFile.SetLoadMode( NO_SEQ | NO_SHADOW );
+      GdcmFile.SetLoadMode( NO_SEQ );
       GdcmFile.Load(filename->c_str() );
       if (!GdcmFile.IsReadable())
       {
@@ -745,7 +748,10 @@ int vtkGdcmReader::CheckFileCoherenceLight()
    }
    int NX           = GdcmFile.GetXSize();
    int NY           = GdcmFile.GetYSize();
-   int NZ           = GdcmFile.GetZSize();
+   // CheckFileCoherenceLight should be called *only* when user knows
+   // he deals with single frames files.
+   // Z size is then the number of files.
+   int NZ           = InternalFileNameList.size();
    std::string type = GdcmFile.GetPixelType();
    vtkDebugMacro(<< "The first file is taken as reference: "
                  << filename->c_str());