]> Creatis software - clitk.git/blobdiff - common/clitkGateAsciiImageIO.h
Applied clitk indentation
[clitk.git] / common / clitkGateAsciiImageIO.h
index ddcd00fbb1d9f28ff3c5108fe8b53174d3db380a..7d174f82ed01e164ef3d9d241af455b046f00428 100644 (file)
@@ -1,7 +1,7 @@
 /*=========================================================================
   Program:   vv                     http://www.creatis.insa-lyon.fr/rio/vv
 
-  Authors belong to: 
+  Authors belong to:
   - University of LYON              http://www.universite-lyon.fr/
   - Léon Bérard cancer center       http://www.centreleonberard.fr
   - CREATIS CNRS laboratory         http://www.creatis.insa-lyon.fr
@@ -30,52 +30,53 @@ typedef unsigned int uint32_t;
 #include <stdint.h>
 #endif
 
-namespace clitk {
-
-    //====================================================================
-    // Class for reading gate ascii Image file format
-    class GateAsciiImageIO: public itk::ImageIOBase
-    {
-       public: 
-           /** Standard class typedefs. */
-           typedef GateAsciiImageIO        Self;
-           typedef itk::ImageIOBase        Superclass;
-           typedef itk::SmartPointer<Self> Pointer;    
-           typedef signed short int        PixelType;
-
-           struct GateAsciiHeader {
-               double matrix_size[3];
-               int resolution[3];
-               double voxel_size[3];
-               int nb_value;
-           };
-
-           GateAsciiImageIO():Superclass() {;}
-
-           /** Method for creation through the object factory. */
-           itkNewMacro(Self);
-
-           /** Run-time type information (and related methods). */
-           itkTypeMacro(GateAsciiImageIO, ImageIOBase);
-
-           /*-------- This part of the interface deals with reading data. ------ */
-           virtual void ReadImageInformation();
-           virtual bool CanReadFile( const char* FileNameToRead );
-           virtual void Read(void * buffer);
-
-           /*-------- This part of the interfaces deals with writing data. ----- */
-           virtual void WriteImageInformation();
-           virtual bool CanWriteFile(const char* filename);
-           virtual void Write(const void* buffer);
-
-           virtual bool SupportsDimension(unsigned long dim);
-
-       protected:
-            static bool ReadHeader(FILE* handle, GateAsciiHeader& header);
-           static bool ReadLine(FILE* handle, std::string& line);
-            static bool FindRegularExpressionNextLine(itksys::RegularExpression &reg, std::string &s, FILE* handle);
-
-    }; // end class GateAsciiImageIO
+namespace clitk
+{
+
+//====================================================================
+// Class for reading gate ascii Image file format
+class GateAsciiImageIO: public itk::ImageIOBase
+{
+public:
+  /** Standard class typedefs. */
+  typedef GateAsciiImageIO        Self;
+  typedef itk::ImageIOBase        Superclass;
+  typedef itk::SmartPointer<Self> Pointer;
+  typedef signed short int        PixelType;
+
+  struct GateAsciiHeader {
+    double matrix_size[3];
+    int resolution[3];
+    double voxel_size[3];
+    int nb_value;
+  };
+
+  GateAsciiImageIO():Superclass() {}
+
+  /** Method for creation through the object factory. */
+  itkNewMacro(Self);
+
+  /** Run-time type information (and related methods). */
+  itkTypeMacro(GateAsciiImageIO, ImageIOBase);
+
+  /*-------- This part of the interface deals with reading data. ------ */
+  virtual void ReadImageInformation();
+  virtual bool CanReadFile( const char* FileNameToRead );
+  virtual void Read(void * buffer);
+
+  /*-------- This part of the interfaces deals with writing data. ----- */
+  virtual void WriteImageInformation();
+  virtual bool CanWriteFile(const char* filename);
+  virtual void Write(const void* buffer);
+
+  virtual bool SupportsDimension(unsigned long dim);
+
+protected:
+  static bool ReadHeader(FILE* handle, GateAsciiHeader& header);
+  static bool ReadLine(FILE* handle, std::string& line);
+  static bool FindRegularExpressionNextLine(itksys::RegularExpression &reg, std::string &s, FILE* handle);
+
+}; // end class GateAsciiImageIO
 } // end namespace
 
 // explicit template instantiation