]> Creatis software - clitk.git/blob - common/clitkHisImageIO.h
added the new headers
[clitk.git] / common / clitkHisImageIO.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://oncora1.lyon.fnclcc.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 #ifndef CLITKHISIMAGEIO_H
19 #define CLITKHISIMAGEIO_H
20 /**
21  ===================================================================
22  * @file   clitkHisImageIO.h
23  * @author Simon Rit <simon.rit@gmail.com>
24  * @date   16 Feb 2010
25
26  * @brief  
27
28  ===================================================================*/
29
30 // itk include
31 #include "itkImageIOBase.h"
32
33 namespace clitk {
34   
35   //====================================================================
36   // Class for reading His Image file format
37   class HisImageIO: public itk::ImageIOBase
38   {
39   public: 
40         /** Standard class typedefs. */
41         typedef HisImageIO              Self;
42         typedef itk::ImageIOBase        Superclass;
43         typedef itk::SmartPointer<Self> Pointer;        
44         typedef signed short int        PixelType;
45         
46         HisImageIO():Superclass() {;}
47
48         /** Method for creation through the object factory. */
49         itkNewMacro(Self);
50         
51         /** Run-time type information (and related methods). */
52         itkTypeMacro(HisImageIO, ImageIOBase);
53         
54         /*-------- This part of the interface deals with reading data. ------ */
55         virtual void ReadImageInformation();
56         virtual bool CanReadFile( const char* FileNameToRead );
57         virtual void Read(void * buffer);
58
59         /*-------- This part of the interfaces deals with writing data. ----- */
60         virtual void WriteImageInformation(bool keepOfStream) { ; }
61         virtual void WriteImageInformation() { WriteImageInformation(false); }
62         virtual bool CanWriteFile(const char* filename);
63         virtual void Write(const void* buffer);
64         
65   protected:
66         int m_HeaderSize;
67
68   }; // end class HisImageIO  
69 } // end namespace
70
71   // explicit template instantiation
72 template class itk::CreateObjectFunction<clitk::HisImageIO>;
73
74 #endif /* end #define CLITKHISIMAGEIO_H */
75