+public:
+ File( Header* header );
+ File( std::string const& filename );
+
+ virtual ~File();
+
+ /// Accessor to \ref Header
+ Header* GetHeader() { return HeaderInternal; }
+
+ int ComputeDecompressedPixelDataSizeFromHeader();
+
+ /// 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();
+ void GetImageDataIntoVectorRaw(void* destination, size_t maxSize);
+
+ // see also Header::SetImageDataSize ?!?
+ bool SetImageData (uint8_t* data, size_t expectedSize);
+
+ /// \todo When the caller is aware we simply point to the data:
+ /// int SetImageDataNoCopy (void* Data, size_t ExpectedSize);
+
+ // Write pixels of ONE image on hard drive
+ // No test is made on processor "endianity"
+ // The user must call his reader correctly
+ bool WriteRawData (std::string const& fileName);
+ bool WriteDcmImplVR(std::string const& fileName);
+ bool WriteDcmExplVR(std::string const& fileName);
+ bool WriteAcr (std::string const& fileName);
+
+ 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);
+
+private:
+ void Initialise();
+
+ // 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,
+ int quality);
+
+ // For JPEG 12 Bits, body in file gdcmJpeg12.cxx
+ bool gdcm_write_JPEG_file12 (FILE* fp, void* image_buffer,
+ int image_width, int image_height,
+ int quality);
+
+ void SaveInitialValues(); // will belong to the future PixelData class
+ void RestoreInitialValues(); // will belong to the future PixelData class
+ void DeleteInitialValues(); // will belong to the future PixelData class
+