RTK  2.1.0
Reconstruction Toolkit
rtkXRadImageIO.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 rtkXRadImageIO_h
20 #define rtkXRadImageIO_h
21 
22 #include <itkImageIOBase.h>
23 #include <fstream>
24 #include <cstring>
25 
26 #include "rtkMacro.h"
27 
28 namespace rtk
29 {
30 
41 {
42 public:
44  using Self = XRadImageIO;
47 
49  : Superclass()
50  {}
51 
53  itkNewMacro(Self);
54 
56  itkTypeMacro(XRadImageIO, ImageIOBase);
57 
58  /*-------- This part of the interface deals with reading data. ------ */
59  void
60  ReadImageInformation() override;
61 
62  bool
63  CanReadFile(const char * FileNameToRead) override;
64 
65  void
66  Read(void * buffer) override;
67 
68  /*-------- This part of the interfaces deals with writing data. ----- */
69  virtual void
70  WriteImageInformation(bool keepOfStream);
71 
72  void
74  {
75  WriteImageInformation(false);
76  }
77 
78  bool
79  CanWriteFile(const char * filename) override;
80 
81  void
82  Write(const void * buffer) override;
83 
84 protected:
85 }; // end class XRadImageIO
86 
87 } // namespace rtk
88 
89 #endif
bool CanReadFile(const char *FileNameToRead) override
bool CanWriteFile(const char *filename) override
void WriteImageInformation() override
Class for reading XRad image file format. XRad is the format of exported X-ray projection images on t...
void Read(void *buffer) override
XRadImageIO Self
void Write(const void *buffer) override
void ReadImageInformation() override