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
#define GDCMFILEHELPER_H
#include "gdcmDebug.h"
-#include "gdcmBase.h"
+#include "gdcmRefCounter.h"
namespace gdcm
* 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
{
};
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();
bool Write (std::string const &fileName);
protected:
+ FileHelper( );
+ FileHelper( File *header );
+
bool CheckWriteIntegrity();
void SetWriteToRaw();
/// 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;
// 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()