RTK  2.6.0
Reconstruction Toolkit
rtkHisImageIO.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  * https://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 rtkHisImageIO_h
20 #define rtkHisImageIO_h
21 
22 // itk include
23 #include <itkImageIOBase.h>
24 #include "RTKExport.h"
25 #include "rtkMacro.h"
26 
27 namespace rtk
28 {
29 
39 class RTK_EXPORT HisImageIO : public itk::ImageIOBase
40 {
41 public:
43  using Self = HisImageIO;
46  using PixelType = signed short int;
47 
49  : Superclass()
50  {
51  ;
52  }
53 
55  itkNewMacro(Self);
56 
58 #ifdef itkOverrideGetNameOfClassMacro
59  itkOverrideGetNameOfClassMacro(HisImageIO);
60 #else
61  itkTypeMacro(HisImageIO, itk::ImageIOBase);
62 #endif
63 
64 
65  /*-------- This part of the interface deals with reading data. ------ */
66  void
67  ReadImageInformation() override;
68 
69  bool
70  CanReadFile(const char * FileNameToRead) override;
71 
72  void
73  Read(void * buffer) override;
74 
75  /*-------- This part of the interfaces deals with writing data. ----- */
76  virtual void
77  WriteImageInformation(bool /*keepOfStream*/)
78  {
79  ;
80  }
81 
82  void
84  {
85  WriteImageInformation(false);
86  }
87 
88  bool
89  CanWriteFile(const char * filename) override;
90 
91  void
92  Write(const void * buffer) override;
93 
94 protected:
96 
97 }; // end class HisImageIO
98 } // namespace rtk
99 
100 #endif /* end #define rtkHisImageIO_h */
signed short int PixelType
Definition: rtkHisImageIO.h:46
void WriteImageInformation() override
Definition: rtkHisImageIO.h:83
virtual void WriteImageInformation(bool)
Definition: rtkHisImageIO.h:77
Class for reading His Image file format.
Definition: rtkHisImageIO.h:39