ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkGE5ImageIO.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software 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  *=========================================================================*/
32 #ifndef itkGE5ImageIO_h
33 #define itkGE5ImageIO_h
34 #include "ITKIOGEExport.h"
35 
36 
37 #include "itkIPLCommonImageIO.h"
38 
39 namespace itk
40 {
50 class ITKIOGE_EXPORT GE5ImageIO:public IPLCommonImageIO
51 {
52 public:
53  ITK_DISALLOW_COPY_AND_ASSIGN(GE5ImageIO);
54 
56  using Self = GE5ImageIO;
59 
61  itkNewMacro(Self);
62 
64  itkTypeMacro(GE5ImageIO, Superclass);
65 
66  /*-------- This part of the interfaces deals with reading data. ----- */
67 
74  bool CanReadFile(const char *FileNameToRead) override;
75 
76  /* * Set the spacing and dimension information for the set filename. */
77  // Implemented in superclass
78  // virtual void ReadImageInformation();
79 
81  void ModifyImageInformation() override;
82 
83  /* * Get the type of the pixel. */
84  // Implemented in superclass
85  // virtual const std::type_info& GetPixelType() const;
86 
87  /* * Reads the data from disk into the memory buffer provided. */
88  // Implemented in superclass
89  // virtual void Read(void* buffer);
90 
91  /* * Compute the size (in bytes) of the components of a pixel. For
92  * example, and RGB pixel of unsigned char would have a
93  * component size of 1 byte. */
94  // Implemented in superclass
95  // virtual unsigned int GetComponentSize() const;
96 
97  /*-------- This part of the interfaces deals with writing data. ----- */
98 
99  /* * Determine if the file can be written with this ImageIO implementation.
100  * \param FileNameToWrite The name of the file to test for writing.
101  * \author Hans J. Johnson
102  * \post Sets classes ImageIOBase::m_FileName variable to be FileNameToWrite
103  * \return Returns true if this ImageIO can write the file specified.
104  */
105  // Implemented in superclass
106  // virtual bool CanWriteFile(const char * FileNameToWrite);
107 
108  /* * Set the spacing and dimension information for the set filename. */
109  // Implemented in superclass
110  // virtual void WriteImageInformation();
111 
112  /* * Writes the data to disk from the memory buffer provided. Make sure
113  * that the IORegions has been set properly. */
114  // Implemented in superclass
115  // virtual void Write(const void* buffer);
116 
117 protected:
118  GE5ImageIO();
119  ~GE5ImageIO() override;
120 
121  GEImageHeader * ReadHeader(const char *FileNameToRead) override;
122 
123 private:
124  int CheckGE5xImages(char const *const imageFileTemplate, std::string & reason);
125 
126 };
127 } // end namespace itk
128 
129 #endif // itkGE5ImageIO_h
Class that defines how to read GE5 file format.
Definition: itkGE5ImageIO.h:50
Light weight base class for most itk classes.
Class that defines how to read GE4 file format.
This file was written as a modification to the itkMetaImageIO as a new method for reading in files fr...
Base class for most ITK classes.
Definition: itkObject.h:60