]> Creatis software - gdcm.git/blobdiff - src/gdcmFile.h
* src/gdcmDocument.cxx ftell() return properly stored in a long (i.e.
[gdcm.git] / src / gdcmFile.h
index 5ef9efeae7b060a8e1743fc435b3fe19b2a66539..7fd947fb16ea947a2aecfd31b778f4a25d43e91a 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFile.h,v $
   Language:  C++
-  Date:      $Date: 2004/10/12 04:35:46 $
-  Version:   $Revision: 1.60 $
+  Date:      $Date: 2004/10/20 14:30:40 $
+  Version:   $Revision: 1.64 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -21,6 +21,7 @@
 
 #include "gdcmCommon.h"
 #include "gdcmHeader.h"
+#include "gdcmPixelConvert.h"
 
 namespace gdcm 
 {
@@ -34,7 +35,7 @@ namespace gdcm
 class GDCM_EXPORT File
 {
 public:
-   File( Header *header );
+   File( Headerheader );
    File( std::string const& filename );
  
    virtual ~File();
@@ -44,19 +45,19 @@ public:
 
    int ComputeDecompressedPixelDataSizeFromHeader();
 
-   void ConvertRGBPlanesToRGBPixels( uint8_t* source, uint8_t* destination );
-   void ConvertYcBcRPlanesToRGBPixels( uint8_t* source, uint8_t* destination );
-   
    /// Accessor to \ref ImageDataSize
    size_t GetImageDataSize(){ return ImageDataSize; };
 
    /// Accessor to \ref ImageDataSizeRaw
    size_t GetImageDataSizeRaw(){ return ImageDataSizeRaw; };
 
+   /// Accessor to \ref PixelConverter
+   PixelConvert* GetPixelConverter(){ return PixelConverter; };
+
    uint8_t* GetImageData();
    size_t GetImageDataIntoVector(void* destination, size_t maxSize);
    uint8_t* GetImageDataRaw();
-   size_t GetImageDataIntoVectorRaw(void* destination, size_t maxSize);
+   void GetImageDataIntoVectorRaw(void* destination, size_t maxSize);
 
    // see also Header::SetImageDataSize ?!?         
    bool SetImageData (uint8_t* data, size_t expectedSize);
@@ -72,16 +73,13 @@ public:
    bool WriteDcmExplVR(std::string const& fileName);
    bool WriteAcr      (std::string const& fileName);
 
-   // Don't look any longer for the code : 
-   // It's in file gdcmParsePixels.cxx
-   bool ParsePixelData();
-
    virtual bool SetEntryByNumber(std::string const& content,
                                  uint16_t group, uint16_t element)
    { 
       HeaderInternal->SetEntryByNumber(content,group,element);
       return true;
    }
+   uint8_t* GetLutRGBA();
      
 protected:
    bool WriteBase(std::string const& fileName, FileType type);
@@ -89,8 +87,6 @@ protected:
 private:
    void Initialise();
 
-   bool ReadPixelData(void* destination);
-   
    // For JPEG 8 Bits, body in file gdcmJpeg.cxx
    bool gdcm_write_JPEG_file    (FILE* fp, void* image_buffer, 
                                  int image_width, int image_heigh,
@@ -105,9 +101,10 @@ private:
    void RestoreInitialValues(); // will belong to the future PixelData class
    void DeleteInitialValues();  // will belong to the future PixelData class 
 
+private:
 // members variables:
 
-   /// \brief Header to use to load the file
+   /// Header to use to load the file
    Header *HeaderInternal;
 
    /// \brief Whether the underlying \ref Header was loaded by
@@ -115,10 +112,13 @@ private:
    ///  the destructor is in charge of deletion.
    bool SelfHeader;
    
-   /// wether already parsed 
+   /// Wether already parsed or not
    bool Parsed;
       
-//
+   /// Utility pixel converter
+   PixelConvert* PixelConverter;
+
+/// FIXME
 // --------------- Will be moved to a PixelData class
 //