]> Creatis software - gdcm.git/blobdiff - src/gdcmFile.h
To prepare use of progression bar in all types of Document
[gdcm.git] / src / gdcmFile.h
index 57ef7d107c03f6aa31af9b2ce5abe36e54d5dfc6..af09e7978a2eba87a9a053eed020e35b508c2dd0 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFile.h,v $
   Language:  C++
-  Date:      $Date: 2005/08/29 13:05:02 $
-  Version:   $Revision: 1.116 $
+  Date:      $Date: 2005/11/28 11:54:51 $
+  Version:   $Revision: 1.122 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -98,13 +98,13 @@ enum ModalityType {
  */
 class GDCM_EXPORT File : public Document
 {
+   gdcmTypeMacro(File);
+
 public:
-   File();
-   GDCM_LEGACY(File( std::string const &filename ));
-   ~File();
+   static File *New() {return new File();}
 
    // Loading
-   GDCM_LEGACY(bool Load( std::string const &filename ));
+   //GDCM_LEGACY(bool Load( std::string const &filename ));
    bool Load(); 
    // Standard values and informations contained in the header
    bool IsReadable();
@@ -175,7 +175,12 @@ public:
    bool Write(std::string fileName, FileType filetype);
 
 protected:
+   File();
+   ~File();
+   /// \brief Protect the Writer from writing illegal groups
+   bool MayIWrite(uint16_t group)
+     { if (group < 8 &&  group !=2 ) return false; else return true; }
+      
    /// Store the RLE frames info obtained during parsing of pixels.
    RLEFramesInfo *RLEInfo;
    /// Store the JPEG fragments info obtained during parsing of pixels.
@@ -198,7 +203,8 @@ private:
    void ComputeJPEGFragmentInfo();
    bool     ReadTag(uint16_t, uint16_t);
    uint32_t ReadTagLength(uint16_t, uint16_t);
-   void ReadAndSkipEncapsulatedBasicOffsetTable();
+   void ReadEncapsulatedBasicOffsetTable();
+   uint32_t *BasicOffsetTableItemValue;
 
 };
 } // end namespace gdcm