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