]> Creatis software - clitk.git/blob - common/clitkHisImageIO.h
7ddb69186c6197a6d859c724ae455757bedda260
[clitk.git] / common / clitkHisImageIO.h
1 #ifndef CLITKHISIMAGEIO_H
2 #define CLITKHISIMAGEIO_H
3
4 /**
5  ===================================================================
6  * @file   clitkHisImageIO.h
7  * @author Simon Rit <simon.rit@gmail.com>
8  * @date   16 Feb 2010
9
10  * @brief  
11
12  ===================================================================*/
13
14 // itk include
15 #include "itkImageIOBase.h"
16
17 namespace clitk {
18   
19   //====================================================================
20   // Class for reading His Image file format
21   class HisImageIO: public itk::ImageIOBase
22   {
23   public: 
24         /** Standard class typedefs. */
25         typedef HisImageIO              Self;
26         typedef itk::ImageIOBase        Superclass;
27         typedef itk::SmartPointer<Self> Pointer;        
28         typedef signed short int        PixelType;
29         
30         HisImageIO():Superclass() {;}
31
32         /** Method for creation through the object factory. */
33         itkNewMacro(Self);
34         
35         /** Run-time type information (and related methods). */
36         itkTypeMacro(HisImageIO, ImageIOBase);
37         
38         /*-------- This part of the interface deals with reading data. ------ */
39         virtual void ReadImageInformation();
40         virtual bool CanReadFile( const char* FileNameToRead );
41         virtual void Read(void * buffer);
42
43         /*-------- This part of the interfaces deals with writing data. ----- */
44         virtual void WriteImageInformation(bool keepOfStream) { ; }
45         virtual void WriteImageInformation() { WriteImageInformation(false); }
46         virtual bool CanWriteFile(const char* filename);
47         virtual void Write(const void* buffer);
48         
49   protected:
50         int m_HeaderSize;
51
52   }; // end class HisImageIO  
53 } // end namespace
54
55   // explicit template instantiation
56 template class itk::CreateObjectFunction<clitk::HisImageIO>;
57
58 #endif /* end #define CLITKHISIMAGEIO_H */
59