RTK  2.1.0
Reconstruction Toolkit
rtkImagXImageIO.h
Go to the documentation of this file.
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 <cstring>
25 
26 #include "rtkMacro.h"
27 
28 namespace rtk
29 {
30 
38 {
39 public:
41  using Self = ImagXImageIO;
44 
46  : Superclass()
47  {}
48 
50  itkNewMacro(Self);
51 
53  itkTypeMacro(ImagXImageIO, ImageIOBase);
54 
55  /*-------- This part of the interface deals with reading data. ------ */
56  void
57  ReadImageInformation() override;
58 
59  bool
60  CanReadFile(const char * FileNameToRead) override;
61 
62  void
63  Read(void * buffer) override;
64 
65  /*-------- This part of the interfaces deals with writing data. ----- */
66  virtual void
67  WriteImageInformation(bool keepOfStream);
68 
69  void
71  {
72  WriteImageInformation(false);
73  }
74  bool
75  CanWriteFile(const char * filename) override;
76 
77  void
78  Write(const void * buffer) override;
79 
80 protected:
81  std::string m_RawFileName;
82 };
83 
84 } // namespace rtk
85 
86 #endif
void Write(const void *buffer) override
void Read(void *buffer) override
void WriteImageInformation() override
ImagXImageIO Self
std::string m_RawFileName
void ReadImageInformation() override
bool CanWriteFile(const char *filename) override
bool CanReadFile(const char *FileNameToRead) override