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