]> Creatis software - clitk.git/blob - common/rtkImagXImageIO.h
Debug RTStruct conversion with empty struc
[clitk.git] / common / rtkImagXImageIO.h
1 /*=========================================================================
2  *
3  *  Copyright RTK Consortium
4  *
5  *  Licensed under the Apache License, Version 2.0 (the "License");
6  *  you may not use this file except in compliance with the License.
7  *  You may obtain a copy of the License at
8  *
9  *         http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  *  Unless required by applicable law or agreed to in writing, software
12  *  distributed under the License is distributed on an "AS IS" BASIS,
13  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  *  See the License for the specific language governing permissions and
15  *  limitations under the License.
16  *
17  *=========================================================================*/
18
19 #ifndef __rtkImagXImageIO_h
20 #define __rtkImagXImageIO_h
21
22 #include <itkImageIOBase.h>
23 #include <fstream>
24 #include <string.h>
25
26 #include "clitkCommon.h"
27
28 namespace rtk
29 {
30
31 /** \class ImagXImageIO
32  *
33  * TODO
34  *
35  */
36 class ImagXImageIO : public itk::ImageIOBase
37 {
38 public:
39   /** Standard class typedefs. */
40   typedef ImagXImageIO            Self;
41   typedef itk::ImageIOBase        Superclass;
42   typedef itk::SmartPointer<Self> Pointer;
43
44   ImagXImageIO() : Superclass() {}
45
46   /** Method for creation through the object factory. */
47   itkNewMacro(Self);
48
49   /** Run-time type information (and related methods). */
50   itkTypeMacro(ImagXImageIO, ImageIOBase);
51
52   /*-------- This part of the interface deals with reading data. ------ */
53   virtual void ReadImageInformation() ITK_OVERRIDE;
54
55   virtual bool CanReadFile( const char* FileNameToRead ) ITK_OVERRIDE;
56
57   virtual void Read(void * buffer) ITK_OVERRIDE;
58
59   /*-------- This part of the interfaces deals with writing data. ----- */
60   virtual void WriteImageInformation(bool keepOfStream);
61
62   virtual void WriteImageInformation() ITK_OVERRIDE { WriteImageInformation(false); }
63   virtual bool CanWriteFile(const char* filename) ITK_OVERRIDE;
64
65   virtual void Write(const void* buffer) ITK_OVERRIDE;
66
67 protected:
68   std::string m_RawFileName;
69 };
70
71 } // end namespace
72
73 #endif