]> Creatis software - clitk.git/blob - common/clitkEsrfHstImageIO.h
Merge branch 'master' of git.creatis.insa-lyon.fr:clitk
[clitk.git] / common / clitkEsrfHstImageIO.h
1 /*=========================================================================
2   Program:   vv                     http://www.creatis.insa-lyon.fr/rio/vv
3
4   Authors belong to:
5   - University of LYON              http://www.universite-lyon.fr/
6   - Léon Bérard cancer center       http://www.centreleonberard.fr
7   - CREATIS CNRS laboratory         http://www.creatis.insa-lyon.fr
8
9   This software is distributed WITHOUT ANY WARRANTY; without even
10   the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11   PURPOSE.  See the copyright notices for more information.
12
13   It is distributed under dual licence
14
15   - BSD        See included LICENSE.txt file
16   - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ===========================================================================**/
18
19 #ifndef __clitkEsrfHstImageIO_h
20 #define __clitkEsrfHstImageIO_h
21
22 #include <itkImageIOBase.h>
23 #include <fstream>
24 #include <string.h>
25
26 namespace clitk
27 {
28
29 //====================================================================
30 // Class for reading Esrf Hst Image file format
31 class EsrfHstImageIO: public itk::ImageIOBase
32 {
33 public:
34   /** Standard class typedefs. */
35   typedef EsrfHstImageIO          Self;
36   typedef itk::ImageIOBase        Superclass;
37   typedef itk::SmartPointer<Self> Pointer;
38
39   EsrfHstImageIO():Superclass() { }
40
41   /** Method for creation through the object factory. */
42   itkNewMacro(Self);
43
44   /** Run-time type information (and related methods). */
45   itkTypeMacro(EsrfHstImageIO, ImageIOBase);
46
47   /*-------- This part of the interface deals with reading data. ------ */
48   virtual void ReadImageInformation();
49   virtual bool CanReadFile( const char* FileNameToRead );
50   virtual void Read(void * buffer);
51
52   /*-------- This part of the interfaces deals with writing data. ----- */
53   virtual void WriteImageInformation(bool keepOfStream);
54   virtual void WriteImageInformation() { WriteImageInformation(false); }
55   virtual bool CanWriteFile(const char* filename);
56   virtual void Write(const void* buffer);
57
58 protected:
59   std::string m_XmlFileName;
60   std::string m_RawFileName;
61 };
62
63 } // end namespace
64
65 #endif
66