X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmFileHelper.h;h=899cb436b75980429536b6d2f5e0a7d7334ad677;hb=6c1b9eb78c07847c3dbfeccc55e031df5cf47a5f;hp=979292bd5794805475beb7a460ae3895a778f93f;hpb=1db7fb8e0037a6797c113bd13c33461c7aa9cc78;p=gdcm.git diff --git a/src/gdcmFileHelper.h b/src/gdcmFileHelper.h index 979292bd..899cb436 100644 --- a/src/gdcmFileHelper.h +++ b/src/gdcmFileHelper.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmFileHelper.h,v $ Language: C++ - Date: $Date: 2005/10/23 15:24:47 $ - Version: $Revision: 1.27 $ + Date: $Date: 2005/10/25 14:52:34 $ + Version: $Revision: 1.29 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -20,7 +20,7 @@ #define GDCMFILEHELPER_H #include "gdcmDebug.h" -#include "gdcmBase.h" +#include "gdcmRefCounter.h" namespace gdcm @@ -40,8 +40,10 @@ typedef void (*VOID_FUNCTION_PUINT8_PFILE_POINTER)(uint8_t *, File *); * for accessing the image/volume content. One can also use it to * write Dicom/ACR-NEMA/RAW files. */ -class GDCM_EXPORT FileHelper : public Base +class GDCM_EXPORT FileHelper : public RefCounter { + gdcmTypeMacro(FileHelper); + public: enum FileMode { @@ -50,9 +52,8 @@ public: }; public: - FileHelper( ); - FileHelper( File *header ); - GDCM_LEGACY(FileHelper( std::string const &filename )); + static FileHelper *New() {return new FileHelper();} + static FileHelper *New(File *header) {return new FileHelper(header);} virtual ~FileHelper(); @@ -149,6 +150,9 @@ public: bool Write (std::string const &fileName); protected: + FileHelper( ); + FileHelper( File *header ); + bool CheckWriteIntegrity(); void SetWriteToRaw(); @@ -182,11 +186,6 @@ private: /// gdcm::File to use to load the file File *FileInternal; - /// \brief Whether the underlying \ref gdcm::File was loaded by - /// the constructor or passed to the constructor. - /// When false the destructor is in charge of deletion. - bool SelfHeader; - /// Whether already parsed or not bool Parsed; @@ -203,10 +202,12 @@ private: // Write variables /// \brief (WMODE_RAW, WMODE_RGB) FileMode WriteMode; + /// \brief (ImplicitVR, ExplicitVR, ACR, ACR_LIBIDO) FileType WriteType; - /// Pointer to a user supplied function to allow modification of pixel order - /// (i.e. : Mirror, TopDown, 90°Rotation, ...) + + /// \brief Pointer to a user supplied function to allow modification + /// of pixel order (e.g. : Mirror, UpsideDown, 90°Rotation, ...) /// use as : void userSuppliedFunction(uint8_t *im, gdcm::File *f) /// NB : the "uint8_t *" type of first param is just for prototyping. /// User will Cast it according what he founds with f->GetPixelType()